时间:13-01-16 栏目:Linux开发 作者:魔豆先生 评论:0 点击: 8,010 次
本文标签: invalid first line in script , shc
问题:运行shc的时候出现如下错误
Code: $ shc -f test1.sh shc: invalid first line in script
分析下:脚本可以正常运行
$cat test1.sh echo "hello" cal
$ 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:
声明: 本文由( 魔豆先生 )原创编译,转载请保留链接: [解决方法]shc -f xxx.sh shc: invalid first line in script
Linux系统与内核学习群:194051772
WP建站技术学习交流群:194062106