1 頁 (共 1 頁)

將 DOS 檔案的字尾符號 ^M 的符號去除!

文章發表於 : 2008年 8月 15日, 22:18
super
代碼: 選擇全部
[root @test /root ]# tr [-ds] SET1
參數說明:
-d  :刪除 SET1 這個字串
-s  :取代掉重複的字元!
範例:
[root @test /root]# last | tr '[a-z]' '[A-Z]'         <==將小寫改成大寫
[root @test /root]# cat /etc/passwd | tr -d :       <K> dostxt-noM   <==將 DOS 檔案的字尾符號 ^M 的符號去除!


http://linux.vbird.org/linux_basic/0320 ... 20bash.php