Re: Striping comment from configuration files on stdout

2007-11-11 Thread Jean-Louis Crouzet
Raj Kiran Grandhi wrote: Jean-Louis Crouzet wrote: Jochen Schulz wrote: 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 w

Re: Striping comment from configuration files on stdout

2007-11-08 Thread Raj Kiran Grandhi
Jean-Louis Crouzet wrote: Jochen Schulz wrote: 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*

Re: Striping comment from configuration files on stdout

2007-11-08 Thread Jochen Schulz
Jean-Louis Crouzet: > Jochen Schulz wrote: >> >> If you want to strip empty lines and lines beginning with whitespace >> followed by a ';' as well, do >> >> grep -E -v '(^\s*;)|^\s*$' >> > OK thanks for the tip now running. I still need display line such as > > bindport=5060 ; UD

Re: Striping comment from configuration files on stdout

2007-11-08 Thread Jean-Louis Crouzet
Jochen Schulz wrote: 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. OK thanks fo

Re: Striping comment from configuration files on stdout

2007-11-08 Thread Jochen Schulz
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 b

Re: Striping comment from configuration files on stdout

2007-11-08 Thread Jean-Louis Crouzet
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 com

Re: Striping comment from configuration files on stdout

2007-11-08 Thread Kevin Mark
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