[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Striping comment from configuration files on stdout



Jean-Louis Crouzet:
> 
> #cat sip.conf | grep -v "^;"

That's a useless use of cat. :) You may instead just do

grep -v '^;' sip.conf

If you want to strip empty lines and lines beginning with whitespace
followed by a ';' as well, do

grep -E -v '(^\s*;)|^\s*$'

J.
-- 
When standing at the top of beachy head I find the rocks below very
attractive.
[Agree]   [Disagree]
                 <http://www.slowlydownward.com/NODATA/data_enter2.html>

Attachment: signature.asc
Description: Digital signature


Reply to: