Shebang 和 Groovy [英] Shebang and Groovy

查看:11
本文介绍了Shebang 和 Groovy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在文件的开头声明它应该作为 Groovy 脚本执行?

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

其他脚本语言的示例:

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

推荐答案

这个#!/usr/bin/env groovy
将搜索你的路径寻找 groovy 来执行脚本

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

这篇关于Shebang 和 Groovy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆