[解决方法]shc -f xxx.sh shc: invalid first line in script
2013-06-26 09:49
2461 查看
问题:运行shc的时候出现如下错误
Code: $ shc -f test1.sh shc: invalid
first line in script
分析下:脚本可以正常运行
Code:
解释:
在脚本的第一行添加上沙邦(#!/bin/bash)
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)
相关文章推荐
- Warning: Invalid argument supplied for foreach() in /home/XXX/XXXX_html/category.php on line 100解决
- Invalid character in the given encoding. Line XX, position XX.解决方法
- Invalid character in the given encoding. Line XX, position XX.解决方法
- Invalid character in the given encoding. Line XX, position XX.解决方法
- 出现 org.apache.tomcat.xxx.ClassFormatException: Invalid byte tag in constant pool: 15 异常的原因及解决方法
- Loadrunner 运行场景时:missing newline in XXX.dat 错误解决
- Linux_服务器_03_xxx is not in the sudoers file.This incident will be reported.的解决方法
- 【Linux学习】Linux报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
- xxx is not in the sudoers file. This incident will be reported的解决方法
- Assertion "OSQCreate" failed at line 71 in ..\LWIP\arch\sys_arch.c错误解决方法
- debian中xxx is not in the sudoers file解决方法
- CentOS 6 xxx is not in the sudoers file解决方法
- Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
- laravel post TokenMismatchException in VerifyCsrfToken.php line 53 问题解决方法
- [Android Lint] xxx is not translated in xxx 的解决方法
- xxx is not in the sudoers file解决方法
- debian中xxx is not in the sudoers file解决方法
- Qt5.7中编译报错:“invalid use of incomplete type 'class Ui::xxx'ui(new Ui::xxx)”的解决方法
- 执行make出现“Warning: File `xxx.c' has modification time 2.6e+04 s in the future“警告的解决方法
- xxx is not translated in yyy, zzz 的解决方法