Skip to content

Instantly share code, notes, and snippets.

@lakemove
Created January 13, 2018 03:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lakemove/e061f725aea7b50c4d34a67b40cf7d5a to your computer and use it in GitHub Desktop.
Save lakemove/e061f725aea7b50c4d34a67b40cf7d5a to your computer and use it in GitHub Desktop.
run groovy script in bash script
#!/bin/bash
GREETINGS='HELLO GROOVY AND BASH'
echo $GREETINGS
#to interpret bash variable , remove single quotes in 'EOF'
groovy -e "new GroovyShell().evaluate(System.in.text)" <<'EOF'
println("this is groovy print")
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment