%EB%A5%BC%20%ED%8C%8C%EC%9D%BC%EB%A1%9C%20%EA%B5%90%EC%B2%B4%2F%EC%A0%9C%EA%B1%B0.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