懵懂毛豆

文章
4
资源
0
加入时间
3年0月21天

linux下执行sh出现异常"syntax error: unexpected end of file"

昨天天在windows系统上用notpad++编写linux shell脚本,当传送到linux上执行时一直报错说“syntax error: unexpected end of file”,然后我同事拿了我的脚本在它的苹果机上的shell执行也没有问题,结果让我纳闷了一天,今天早上以来百度了下这个错误才知道,原来windows 的DOS下的文本文件是以\r\n作为断行标志的,表示成十六进制就