0

I want to replace/remove text all files by a file.

$ echo "_uU_%UHY%^GSSD$%GWRW$T#wf4werwefF$fW#$wfdd%6blahblahblah" > pattern.txt
$ sudo grep -rl "_uU" . | xargs sed -ie s/$(cat pattern.txt)//g

but, my command not working. how can I do this?

0

Solved. It have to remove -e flag.

$ echo "_uU_%UHY%^GSSD$%GWRW$T#wf4werwefF$fW#$wfdd%6blahblahblah" > pattern.txt
$ sudo grep -rl "_uU" . | xargs sed -i s/$(cat pattern.txt)//g

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.