in reply to Re: A perverse use of grep
in thread A perverse use of grep

Your code fails to strip comments off lines it will keep, though. :)

keep this part # part strip this part

Update: That wasn't an intended feature. I guess I'm just too used to doing that since it's so easy to handle. :)

--
brian d foy <brian@stonehenge.com>

Replies are listed 'Best First'.
Re^3: A perverse use of grep
by Errto (Vicar) on Jun 15, 2005 at 03:13 UTC
    True, but the "spec" for the OP didn't say that. It just said to ignore lines starting with # :)
Re^3: A perverse use of grep
by eyepopslikeamosquito (Archbishop) on Jun 15, 2005 at 03:26 UTC
    Yes, Errto is right, the super simple config file format specified for this project only supports comment lines where the first non-white space char is #.