我有一个脚本,它是发送电子邮件的其他链中的一个脚本.
在脚本开始时,我想检查文件是否存在,只有在存在时才继续,否则只是退出.
这是我的脚本的开始:
if [ ! -f /scripts/alert ];
then
echo "File not found!" && exit 0
else
continue
fi
Run Code Online (Sandbox Code Playgroud)
但是我不断收到一条消息说:
line 10: continue: only meaningful in a `for', `while', or `until' loop
Run Code Online (Sandbox Code Playgroud)
有什么指针吗?