RSS feed

sed inline replace/delete

December 2nd, 2008 | Posted in Linux | No Comments

sed -i 's/foo/bar/' file(s) or *

or

sed -i '/foo/d' file(s) or *

or

find /path/to/files -type f -name myfile1 -exec sed -i 's/foo/bar/' {} \;

or

find /path/to/files -type f -name myfile1  | xargs sed -i 's/foo/bar/g'


No Comments to “sed inline replace/delete”

There are no comments yet, add one below.


Leave a Comment






Categories