|
藍森林 http://www.lslnet.com 2006年6月26日 11:18
請教如何去掉^M符號
我現在有個文件的內容如下:
%vi 1.txt
啟:^M
nohup ./busischeduler -c 70_79_radius.cfg >/dev/nul &^M
nohup ./busischeduler -c 70_79_vpmn.cfg >/dev/nul &^M
nohup ./busischeduler -c 701_791_busi.cfg >/dev/nul &^M
nohup ./busischeduler -c 701_791_act.cfg >/dev/nul &^M
nohup ./busischeduler -c 795_796_798_busi.cfg >/dev/nul &^M
nohup ./busischeduler -c 795_796_798_act.cfg >/dev/nul &^M
在vi 操作中如果去掉符合^M ?及在sed 、在tr中怎麼去掉?
我用如下語句不知道為什麼沒有用啊:
%tr -s "[\015\032]" "\n" < 1.txt >2.txt
%sed '/\015//' 1.txt
|
我是根據《shell編程和unix命令》 的第十二章寫的例子,怎麼是錯誤的? |
dos2unix |
回復 1樓 yibhpower 的帖子
請各路ggmm們幫忙看看 |
sed 's/..$//g' srcfile > destfile
試試 |
-->
i like this |
自打CU開版,這個問題就被無數次的問無數次的答過了~,呵呵,時常翻翻精華區,有必要的 |
可能是你上傳的模式不正確吧。
樓主上傳的應該使用的是二進制模式吧,使用ASCII碼上傳一下看看,應該可以的吧。 |
-->
閱人無數? |
-->
是無數人閱吧 |
| |