Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. if [ $# -ne 1 ]; then
  4. echo "Usage: $0 <host>"
  5. exit 1
  6. fi
  7.  
  8. echo "magic gremlin cli"
  9. while read -p "> " -r line; do
  10. if [ "$line" = "quit" ]; then
  11. exit 0
  12. else
  13. curl -X POST -d "{\"gremlin\":\"$line\"}" http://$1:8182/gremlin
  14. fi
  15. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement