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

Table of Contents

請問一下

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

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

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

--

All Comments

Oscar avatarOscar2010-08-25
find DIR -type f -exec sed -e "s/[[:blank:]]$/" {} \;
Audriana avatarAudriana2010-08-27
sorry, 應該是 sed -e "s/[[:blank:]]$//g"
Lucy avatarLucy2010-08-28
如果有行尾有多個空白字元 sed -e "s/[[:blank:]]*$//g"
Franklin avatarFranklin2010-09-02
感恩