script不是可执行的常规文件

时间:2017-03-17 09:47:02

标签: shell ubuntu

我使用sudo nano yellowfin创建了一个脚本,然后输入下面的代码并保存,但是当我尝试运行它时,它会给我script yellowfin is not an executable regularfile, skipped

的错误

文件中的代码

#!/bin/bash
# USAGE: start|stop
#
case "$1" in
start)
echo "Starting Yellowfin."
/opt/yf/appserver/bin/startup.sh
;;
stop)
echo "Stopping Yellowfin."
/opt/yf/appserver/bin/shutdown.sh
;;

*)
echo “Yellowfin Service”
echo $”Usage: $0 {start|stop}”
exit 1
esac
exit 0

然后我用

更新
 sudo update-rc.d yellowfin defaults

1 个答案:

答案 0 :(得分:4)

首先确保您的脚本可以git reset --soft HEAD^ git reset --soft HEAD^ # two times git reset HEAD .idea/ # and the same for other directories git add -A git commit --amend 执行,然后修复chmod +x yellowfin将其添加到bash脚本的顶部:

script missing LSB tag and overrides