什么是Scala的shebang系列,它不会破坏mimetype?
发布时间:2020-12-16 18:40:43 所属栏目:安全 来源:网络整理
导读:我一直在使用它,但它将mimetype更改为text / x- shellscript,这使得像Emacs这样的编辑器将我的代码视为 Shell脚本. #!/bin/shexec scala "$0" "$@"!# 解决方法 bangshe(!#)可能是问题所在 我在我的环境中注释了!#和以下工作: 文件:hello.sh #!/usr/bin/e
我一直在使用它,但它将mimetype更改为text / x-
shellscript,这使得像Emacs这样的编辑器将我的代码视为
Shell脚本.
#!/bin/sh exec scala "$0" "$@" !# 解决方法
bangshe(!#)可能是问题所在
我在我的环境中注释了!#和以下工作: 文件:hello.sh #!/usr/bin/env scala val name = readLine("What is your name? ") println("Hello " + name + "!") 更改为可执行权限然后运行: chmod a+x hello.scala ./hello.scala (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |