2016-04-27 24 views
0

我試圖組織和重新命名一些roms我已經使用命令行來刪除像「(USA)」和「(日本)」的區域,包括前面的空間從文件名。現在我需要更新我的.CUE文件,我已經試過以下,但缺少的東西...從多個文件中刪除字符串

grep --include={*.cue} -rnl './' -e " (USA)" | xargs [email protected] sed -i 's/ (USA)//g' @ 

grep --include={*.cue} -rnl './' -e " (Europe)" | xargs [email protected] sed -i 's/ (Europe)//g' @ 

grep --include={*.cue} -rnl './' -e " (Japan)" | xargs [email protected] sed -i 's/ (Japan)//g' @ 

我得到它在一個場合工作,但不能看到便又得到它.. 。

+0

什麼是錯的'sed的-i的/(日本)//克; S /(歐洲)//克; S /(美國)//g'* .cue'? – 7171u

+1

@ 7171u'sed -i's /(\(Japan | Europe | USA \))// g'* .cue' – 123

+0

@ 123在添加必須刪除的空間後發佈您的改進。 –

回答

0

真棒,謝謝,我使用:

sed -i 's/ (Japan)//g;s/ (Europe)//g;s/ (USA)//g' *.cue