.png)
すべてのファイルのテキストをファイルで置き換え/削除したい。
$ echo "_uU_%UHY%^GSSD$%GWRW$T#wf4werwefF$fW#$wfdd%6blahblahblah" > pattern.txt
$ sudo grep -rl "_uU" . | xargs sed -ie s/$(cat pattern.txt)//g
しかし、コマンドが機能しません。どうすればいいでしょうか?
答え1
解決しました。フラグを削除する必要があります-e
。
$ echo "_uU_%UHY%^GSSD$%GWRW$T#wf4werwefF$fW#$wfdd%6blahblahblah" > pattern.txt
$ sudo grep -rl "_uU" . | xargs sed -i s/$(cat pattern.txt)//g