去除文件裡的 ^M 特殊符號

一般 ^M 符號是出現在每行的最後
這時可利用 dos2unix 指令來解決會比較簡單

但偶有情況是出現在行中, 而不是在行尾/行末
這時 dos2unix 就會處理不到

這時要改用以下網頁的方法

http://dragonspring.pixnet.net/blog/post/33146613

sed  "s/\r//" dos_file  > dos_file_linux

或是

tr -d "\r" < dos_file  > dos_file_linux

Leave a comment

Your comment


Warning: Undefined variable $user_ID in /var/www/sites/wordpress/wp-content/themes/librio/comments.php on line 67