问题:运行shc的时候出现如下错误
Code: $ shc -f test1.sh shc: invalid first line in script
分析下:脚本可以正常运行
$cat test1.sh echo "hello" cal
Code:
$ shc -f test1.sh
shc: invalid first line in script: echo "hello"
shc: Success
原因:
You have to put the sha-bang (e.g. #!/bin/bash) at the beginning of the script, since shc need to know which shell is using. Here is an excerpt from the manual page:
解释:
在脚本的第一行添加上沙邦( #!/bin/bash)