Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有一个shell脚本已经运行了几年没有问题。这很简单——只需在某些文件上运行 dos2unix,每次检查退出代码并中止脚本 if $? 不为 0。
上周三,dos2unix 开始给出错误代码 1,因此中止脚本。服务器上没有进行明显的更改,如果我从命令行运行脚本它可以工作 - 只是在由 cron 启动时没有。
转换似乎正常,但问题是它重命名由 dos2unix 创建的临时文件时。
似乎它应该非常简单,但我已经没有想法接下来要检查或尝试什么。有人有想法么?