Tuesday, February 8, 2011

Using sed

For searching and replacing text in a file

sed 's/<text to be searched>/<replacing text>/' <input file>
For example sed 's/foo/bar/' test, replaces the word foo with bar in the file test

No comments:

Post a Comment