Shebang and Groovy

Nulldevice picture Nulldevice · Mar 30, 2011 · Viewed 16.9k times · Source

Is it possible to declare at the start of a file that it should be executed as a Groovy script?

Examples for other scripting languages:

#!/bin/sh
#!/usr/bin/python
#!/usr/bin/perl

Answer

jpertino picture jpertino · Mar 30, 2011

This one #!/usr/bin/env groovy
will search your path looking for groovy to execute the script