[svlug] bash scripts - config files with comments?

Florin Andrei florin at andrei.myip.org
Sat Aug 18 00:14:49 PDT 2007


Robert Citek wrote:
> 
> Avoiding sed:
> 
> while read LINE; do
>    LINE=${LINE%%#*}
>    [ -z "$LINE" ] && continue
>    : do what you want here
> done < config-file

Looks like it's exactly what I was looking for. Thanks!

Now let me test it a little bit...

-- 
Florin Andrei

http://florin.myip.org/



More information about the svlug mailing list