Mailinglist Archive: opensuse-security (457 mails)

< Previous Next >
Re: [suse-security] Grep uncomment lines from .conf
  • From: Armin Schoech <armin.schoech@xxxxxx>
  • Date: Thu, 12 Feb 2004 08:12:46 +0000 (GMT)
  • Message-id: <Pine.LNX.4.58.0402120810001.841@xxxxxxxxxxxxxxxxxxxxx>
Hi !

> I want to grep lines that not commented from a file, Someone said that I can
> use
> $sed -e '/^[[:space:]]*#/d;/^[[:space:]]*$/d' file.conf
>
--> Another idea to remove these kind of comments, even if they do not
start in the beginning of the line:

sed -e 's/#.*//g'|grep -v '^$'

HTH,
Armin


PS: By the way, why do you send all your messages 3-6 times to this
list ?

--
Am Hasenberg 26 office: Institut für Atmosphärenphysik
D-18209 Bad Doberan Schloss-Straße 6
Tel. ++49-(0)38203/42137 D-18225 Kühlungsborn / GERMANY
Email: schoech@xxxxxxxxxxxx Tel. +49-(0)38293-68-102
WWW: http://armins.cjb.net/ Fax. +49-(0)38293-68-50

< Previous Next >
Follow Ups