Minimal SED

Here I will add few SED one liners which are in almost everyday usage. Needless to say there are really tricky things that can be done with sed, but lets use it for substitutions.

SYNTAX for substitution

SED oneliners are effective in relacing a placeholder in scripts. This code sample replaces all occurances of 'xxxx' in 'file.text' to 'yyyy' in a new file. 's' is substitution command and 'g' is global application command.

sed 's/xxxx/yyyy/g' text.file > new.file

combine multiple sed commands
sed -e '///' -e '///' text.file > new.file