sed how to ignore remarked lines

Posted by yael on Super User See other posts from Super User or by yael
Published on 2010-05-27T12:47:08Z Indexed on 2010/05/27 12:52 UTC
Read the original article Hit count: 235

Filed under:

hi all
I have the following sed command in my script

sed -i "/$PARAM/s/$OLD/$BEW/g"           $FILE

this sed command replace the OLD value to new in the line that PARAMETER exsit

but I need also to ignore the "#" lines
how it can possible to change the sed syntax in order to ignore "#" lines?

© Super User or respective owner

Related posts about sed