https://www.shellcheck.net
2019年3月14日 星期四
2012年1月3日 星期二
將檔案從DOS格式轉成UNIX格式
不同檔名:
tr -d '\r' < TEST.sh > TEST2.sh
TEST.sh是來源檔,TEST2.sh是目地檔
同檔名:
perl -pi -e 's/\r\n/\n/g' TEST.sh
p.s.1.如果檔案是DOS格式,用vi編輯會看到^M的換行符號
p.s.2.用WinSCP傳檔會自動改格式,需參考 http://winscp.net/eng/docs/ui_pref_transfer,將
傳輸模式改成Binary
出處:
http://www.cyberciti.biz/faq/howto-unix-linux-convert-dos-newlines-cr-lf-unix-text-format/
tr -d '\r' < TEST.sh > TEST2.sh
TEST.sh是來源檔,TEST2.sh是目地檔
同檔名:
perl -pi -e 's/\r\n/\n/g' TEST.sh
p.s.1.如果檔案是DOS格式,用vi編輯會看到^M的換行符號
p.s.2.用WinSCP傳檔會自動改格式,需參考 http://winscp.net/eng/docs/ui_pref_transfer,將
傳輸模式改成Binary
出處:
http://www.cyberciti.biz/faq/howto-unix-linux-convert-dos-newlines-cr-lf-unix-text-format/
2012年1月2日 星期一
2011年12月2日 星期五
2011年3月13日 星期日
訂閱:
文章 (Atom)