我对Linux和shell脚本不是很熟悉,总之我尝试了一些我想添加到我的启动脚本中的命令,但遇到了一些问题。
我曾尝试用不同的方法来摆脱
: unexpected end of file"
command not found
in this
#!/bin/bash
DEBUG="$1"
if [ "$DEBUG" = "debug" ]; then
echo "Lets start in debug mode"
And I trie to run it from comm和line ike this
# sh myscript.sh debug
我也尝试过像这样修改if
if [ "$DEBUG" = "debug" ]
echo ......
但错误仍然存在
我知道我可以像这样运行它,但它似乎没有满足。
./myscript.sh debug
请给我们一个提示或提示,我们将不胜感激! :)