One-line Shell Script For Find And Replace
Join the DZone community and get the full member experience.Join For Free
An equivalent of the other find-replace, except it's a one-liner that generates no temp files, and is more flexible:
perl -pi -e 's/find/replace/g' *.txtOr, to change matching files in a hierarchy:
find . -name '*.txt' |xargs perl -pi -e 's/find/replace/g'