去除各檔案行尾的空白字元 - Linux

Megan avatar
By Megan
at 2010-08-21T21:02

Table of Contents

請問一下

如果我想去除各檔案行尾的空白字元 該怎麼處理

理想的情況下是從 PWD 目錄中開始遞迴每個子目錄

有辦法用現成指令兜成嗎?

--
Tags: Linux

All Comments

Oscar avatar
By Oscar
at 2010-08-25T08:41
find DIR -type f -exec sed -e "s/[[:blank:]]$/" {} \;
Audriana avatar
By Audriana
at 2010-08-27T04:07
sorry, 應該是 sed -e "s/[[:blank:]]$//g"
Lucy avatar
By Lucy
at 2010-08-28T22:04
如果有行尾有多個空白字元 sed -e "s/[[:blank:]]*$//g"
Franklin avatar
By Franklin
at 2010-09-02T16:49
感恩

SCIM新酷音按Shift會自動加詞的問題

Freda avatar
By Freda
at 2010-08-21T16:50
想請教各位版友,我剛剛灌了Ubuntu下的SCIM新酷音輸入法 遇到了一個問題 在我打字的時候,假設我要打 and#34;硬碟分割軟體Easeusand#34; 這幾個字 當我打完前面的中文字,要換打英文的時候 我會習慣按一下Enter,表示我前面中文不用選詞 然後再按Shift切換成英打打算輸入 ...

gnome panel出現破碎圖形

Zanna avatar
By Zanna
at 2010-08-21T13:01
當某些應用程式縮小到notification area 或 system tray 的時候 就會出現panel背景顏色爛掉 就像下圖這樣: http://picasaweb.google.com/lh/photo/PwAVljylXk51EmnD-J4xYw?feat=directlink 有人遇過類似的 ...

網頁監視器

Ivy avatar
By Ivy
at 2010-08-21T03:04
請問在linux上有沒有這樣的軟體 能夠將webcam的影像以網頁方式呈現 能夠在遠端透過網頁的方式觀看 類似在windows上的webcamxp 希望至少功能有 1.可以在local端設定播放解析度 2.實現方式至少有一種最簡單的方式是以不斷刷新網頁來更新圖片 我的OS是ubuntu-10.04 ...

想請大家推薦一本書 關於gcc makefile 跟運作的

Annie avatar
By Annie
at 2010-08-21T01:59
我因為工作關係 需要再Linux上 用gcc 寫c++ 因為以前都是在windows上寫程式 所以沒有寫過makefile 覺得很苦手 想買本書來k一下 各位有推薦的書嗎 感謝 gcc or makefile or Linux的 主要是文字介面不是圖形的 工作內容是 在Linux上 用gcc 寫c+ ...

shell script 能夠加密嗎?

Freda avatar
By Freda
at 2010-08-21T01:58
請教版上高手 shell script 能將內容加密嗎? 加密後的shell script還是可以運行的 只是內容看起來是亂碼 舉例來說好了 有一隻shell script叫 a.sh 執行的方式是用/bin/sh /opt/a.sh 假設a.sh的內容是 if [ and#34;$#and ...