2016-04-27 12 views
0

私はいくつかのROMを整理して名前を変更しようとしていますが、コマンドラインを使って "(USA)"や "(Japan)"のような領域をファイル名。今、私は私の.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 /(USA)//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 
関連する問題