9

r command not found

 3 years ago
source link: https://jimolonely.github.io/2019/10/15/shell/003-carriage-linechange/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

r command not found

当然,这个由于操作系统之间的差异构成的回车换行符。

下面说说windows下的脚本拷到linux上出现这个问题时怎么解决:

1.直接替换掉

sed -i 's/\r$//' filename

2.使用工具替换掉

# install dos2unix

dos2unix test.sh

Share


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK