Wednesday, October 5, 2022

[SOLVED] Shebang and Groovy

Issue

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

Solution

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



Answered By - jpertino
Answer Checked By - Timothy Miller (WPSolving Admin)