本文共 145 字,大约阅读时间需要 1 分钟。
windows下写了一个shell脚本
在linux下执行
怀疑有奇怪的字符,使用cat -A 你的shell脚本,试试
cat -A 你的shell脚本
好像有特殊字符
执行dos2unix relation.sh 试试
dos2unix relation.sh
看起来没什么变化,我们在linux下执行脚本试试,结果可以
总结:写shell尽量在linux环境下