Kevin Mark wrote:
On Thu, Nov 08, 2007 at 09:00:56AM +0100, Jean-Louis Crouzet wrote:
Hi all,
this is something I saw in the past in this NG but I can't retrieve it 
anywhere. I looked for it since a while without any luck. Then I decided to 
try here...
Goal is from bash command to strip command lines from a configuration file 
(i.e for asterisk sip.conf) and display the output on sdout or pipe it into 
a new file. I would like to keep only used lines...
Hoping this clear; many thanks in anticipation.

Regards,
JL
Many conf files use the '#' symbol to start comment line, so if a line
starts with '#', its a comment. 'grep -v "^#" filename' may be the
command to do it.
-K
Hi Kevin,

thanks for your reply, that's exactly what I was looking for and it works like a charm.
Regards,
JL

#cat sip.conf | grep -v "^;"


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


Reply via email to