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

Re: [suse-security] Grep uncomment lines from .conf

On Thu, 2004-02-12 at 05:04, Arie Reynaldi Zanahar wrote:
> Dear,
> 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 
> but I think it's too long, I have use
> $egrep -v '^#' file.conf 
Just add |egrep -v '^$' to the end :
$egrep -v '^#' file.conf|egrep -v '^$'

> but it containt so many blank lines. Is there any suggest what should I use ? 
> Maybe like combining egrep with other script..  As simple as possible :)
> regards,
> -- 
> Arie Reynaldi Zanahar
Raymond Leach <raymondl@xxxxxxxxxxxxxxxxxxxxxx>
Network Support Specialist
"lynx -source http://www.rchq.co.za/raymondl.asc | gpg --import"
Key fingerprint = 7209 A695 9EE0 E971 A9AD  00EE 8757 EE47 F06F FB28

Attachment: signature.asc
Description: This is a digitally signed message part