NAME sed - stream editor for filtering and transforming text -e script, --expression=script add the script to the commands to be executed -i[SUFFIX], --in-place[=SUFFIX] edit files in place (makes backup if SUFFIX supplied)
sed -i 's/string1/string2/g' test.txt sed -i 's/string1/string2/g' *.txt sed -i 's/string1/string2/g' ./* sed -i 's#string1#string2#g' test.txt sed -i "s#string1#string2#g" test.txt
sed -i.bak 's/string1/string2/g' *.conf sed -i.bak 's/string1/string2/g' ./*
find ./ -name '*.php' -exec sed -i 's/TYPO/TYPE/g' {} \;
sed -i "s/IPADDR=192.168.0.10/IPADDR=192.168.0.11/g" ifcfg-eth0
cat input.txt | sed -e 's/xxx/XXX/g' > output.txt
sed -e 's/xxx/XXX/g' input.txt > output.txt
sed -e ' s/A/a/g s/C/c/g s/G/g/g s/T/t/g' input.txt
sed -f sample.sed input.txt
sed -i -e 's/\r//g' input.txt
sed -e 's/AAA/BBB/g' -e 's/CCC/DDD/g' input.txt
sed -e 's/<tab>/<space>/g'
sed -e "s/^/text/"
sed -e "s/\$/text/"
sed '/^#/d' input.txt
sed '/^$/d' input.txt
sed -e 's/^[<space><tab>]*//'
sed -e 's/[<space><tab>]*$//'