Re: regexp---remove comments---simplification
On Fri, Feb 21, 2003 at 01:50:31PM +0000, Colin Watson wrote:
>
> You'll want something like this:
>
> grep -v '^\( *#\| $\)' some.conf > condensed.file
>
> or:
>
> egrep -v '^( *#| $)' some.conf > condensed.file
And what would that do with a line like this?
some valid stuff # comment
As I understand it your solution would delete that line also.
Regards.
Johann
--
Johann Spies Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch
"My sheep hear my voice, and I know them, and they
follow me; And I give unto them eternal life; and they
shall never perish, neither shall any man pluck them
out of my hand." John 10:27,28
Reply to: