http://qs321.pair.com?node_id=751720


in reply to Remove a line from a file using perl one liner

perl -pi -e 's#Alias.*/icons/.*##s;' one.txt

Replies are listed 'Best First'.
Re^2: Remove a line from a file using perl one liner
by ikegami (Patriarch) on Mar 19, 2009 at 14:00 UTC
    Lines in httpd conf files are sometimes indented.
    perl -pi -e's#^\s+Alias.*/icons/.*##s' one.txt

      You're absolutely right. Thanks

      I'll go and write on the white board 'assumptions are evil' :o)

      Thanks All ...It worked well for me.
      Thanks a lot.