Find and remove all instances of TEXT:
sed 's/TEXT//g'
Find and remove all spaces:
sed -e 's/ //g'
sed '/^$/d' <FILE>
sed 's/^[ \t]*//' <FILE>
sed 's/[ \t]*$//' <FILE>
sed 's/^[ \t]*//;s/[ \t]*$//' <FILE>
sed -i '/PATTERN/i REPLACEWITH' <FILE>
Change BRIDGE_HOTPLUG=yes to BRIDGE_HOTPLUG=no no matter what it is already set to:
sed '/BRIDGE_HOTPLUG=/ s/=.*/=no/' /etc/default/bridge-utils
Change PermitRootLogin no to PermitRootLogin yes no matter what it is already set to:
sed '/PermitRootLogin / s/ .*/ yes/' /etc/ssh/sshd_config
Change date=2015 to date=“2015”:
echo 'date=2015' | sed 's/\(=[[:blank:]]*\)\(.*\)/\1"\2"/'
sed -e :a -e '$!N;s/\n //;ta' -e 'P;D' <FILE>
sed -n 's/.*href="\([^"]*\).*/\1/p' <FILE.html>