I was looking for the easiest way to execute a single gremlin query from the command line, and cobbled this together using the gremlin console:
To use:
docker-compose up
to fire up a local Tinkerpop./gremlin.query.sh host "query"
Example:
> ./gremlin-query.sh localhost "g.addV('foobar')"
WARNING: An illegal reflective access operation has occurred