Monday, July 25, 2011

In place editing of files quickly

Use the sed -i option for in place editing of files:

sed -i 's/foo/bar/g' FILENAME

It will replace all occurances of foo with bar within FILENAME

No comments: