I'd like to grep and replace specific text in textfiles within a directory and all subdirs. I try the following:
ls -R | egrep '.*\.txt' | perl -i -p -e 's/one.a/two.a/g'
Although grep spits out a list and this executes, I can't seem to get perl to actually write to the files. If possible, I'm interested in learning how to do this without the use of
Can anyone spot where I'm going wrong?