User Tools

Site Tools


notes:sed

To remove all lines that begin with a # and then delete all blank lines

sed '/^#/d; /^$/d' dovecot-ldap.conf 
sed -r '/^#/d; /^ +#/d; /^$/d; s/^/  /' dovecot.conf

# insert 5 blank spaces at beginning of each line (make page offset) sed 's/^/ /'

http://www.eng.cam.ac.uk/help/tpl/unix/sed.html

notes/sed.txt · Last modified: by david