Running a Gremlin script from Gremlin Console

3,546 views
Skip to first unread message

Pranav Shah

unread,
Nov 29, 2011, 12:54:24 PM11/29/11
to gremli...@googlegroups.com
Hi,
  Based on the "Getting Started" documentation I created the the "example.grm" file.  I am able to run it from the command line. 

  My question is, what do I need to do to run it from the Gremlin Console?

Thanks

Marko Rodriguez

unread,
Nov 29, 2011, 12:56:28 PM11/29/11
to gremli...@googlegroups.com
Huh,

  Based on the "Getting Started" documentation I created the the "example.grm" file.  I am able to run it from the command line. 

  My question is, what do I need to do to run it from the Gremlin Console?

Do:

gremlin> \h

You can then do, I believe:

load example.grm

Try it and tell me how it works.

Thanks,
Marko.

Pranav Shah

unread,
Nov 29, 2011, 1:29:58 PM11/29/11
to gremli...@googlegroups.com
Thanks that worked.


Gremlin Console:
gremlin> load C:\Projects\gremlin\example.grm
1
2
3
==>null
gremlin>

DOS:
C:\Projects\gremlin\gremlin-1.3>gremlin.bat -e C:\Projects\gremlin\example.grm
1
2
3

C:\Projects\gremlin\gremlin-1.3\target\gremlin-1.3-standalone\bin>

Is the "==>null" expected in the console version?

Thanks


Marko Rodriguez

unread,
Nov 29, 2011, 2:48:35 PM11/29/11
to gremli...@googlegroups.com
Hey,

> Thanks that worked.

Cool.

> Is the "==>null" expected in the console version?

That just means the method is void. So yes, its expected.

Thanks,
Marko.

http://markorodriguez.com

Reply all
Reply to author
Forward
0 new messages