sed

basic examples

replace/substitute only the first occurence of each line

sed 's/<replaceThis>/<withThis>/'

replace/substitute the N first occurences of each line

sed 's/<replaceThis>/<withThis>/<N>'

replace/substitute all occurrences

sed 's/<replaceThis>/<withThis>/g'

replace/substitute only if the line contains

sed '/<IfLineWithThis>/s/<replaceThis>/<withThis>/g'

replace/substitute only if the line doesn't contain

sed '/<IfLineWithoutThis>/!s/<replaceThis>/<withThis>/g'
facebook icon delicious icon twitter icon linkedin icon viadeo icon reddit icon digg icon stumbleupon icon
Follow Readylines.com on twitter