Shebang和Groovy [英] Shebang and Groovy
本文介绍了Shebang和Groovy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在文件开头声明它应该作为Groovy脚本执行?
其他脚本语言的示例:
#!/ bin / sh
!!/ usr / bin / python
#!/ usr / bin / perl
#!/ usr / bin / env groovy
会搜索你的路径让groovy执行脚本
会搜索你的路径让groovy执行脚本
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
解决方案
This one #!/usr/bin/env groovy
will search your path looking for groovy to execute the script
这篇关于Shebang和Groovy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文