Stephen Gran on 10 Nov 2003 21:53:02 -0500 |
Hello all, I am trying to write a regexp that lets me use grep (or really, egrep) to read a standard conffile-style file. This means that I want to ignore any line that begins with a comment (for which I am currently only allowing the use of #), any line that is just a newline, and any line that is just whitespace (we don't need to worry about the possibility of multiline strings in this case). I can come up with egrep -v '^#|^$' to ignore comments and _only_ newlines, but I would also like to ignore unseen whitespace (like \s*) - [:space:] just doesn't seem to be working for me. Can somebody whack me with a cluebat? Thanks, -- -------------------------------------------------------------------------- | Stephen Gran | The one day you'd sell your soul for | | steve@lobefin.net | something, souls are a glut. | | http://www.lobefin.net/~steve | | -------------------------------------------------------------------------- Attachment:
pgpngYrgKnYou.pgp
|
|