CorrectInstance=DEV
Instance_Name=DEV
if [ $Instance_Name == $CorrectInstance ]
then
echo "Instance validated sucessfully"
else
echo "Instance validation failed. Script exited."
exit
fi
Run Code Online (Sandbox Code Playgroud)
当我在脚本上面运行时,我遇到了错误.
Match.sh[3]: ^M: not found [No such file or directory]
Match.sh: line 3: syntax error at line 10: `fi' unexpected
Run Code Online (Sandbox Code Playgroud)
请sugeest
Eri*_*ouf 10
^M也\r 因此,有可能你在某些时候有这个在Windows系统和编辑它那里有行序列的末端\r\n.dos2unix如果有可用的话,尝试在它上面运行,否则你可以使用类似的工具sed从行的末尾删除空格.