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

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

文章super » 2008年 8月 15日, 22:18

代碼: 選擇全部
[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
super
系統管理員
 
文章: 2226
註冊時間: 2008年 8月 15日, 07:39

回到 Linux 筆記



cron