back toc next

sed commands

Eliminate comments

bash$ sed -e 's/#.*//' /etc/inetd


The substitute command:
s/re/repl/flags

flags is zero or more of the characters

s/// is not recursive

s/abc/abc/g

This is not a endless loop!
s/otto/o/g

The String "ottotto" will be changed to "otto", not to "o".