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

Re: Striping comment from configuration files on stdout



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
-- 
|  .''`.  == Debian GNU/Linux == |       my web site:           |
| : :' :      The  Universal     |mysite.verizon.net/kevin.mark/|
| `. `'      Operating System    | go to counter.li.org and     |
|   `-    http://www.debian.org/ |    be counted! #238656       |
|  my keyserver: subkeys.pgp.net |     my NPO: cfsg.org         |
|join the new debian-community.org to help Debian!              |
|_______  Unless I ask to be CCd, assume I am subscribed _______|



Reply to: