Re: regex question
On 13/04/2008, Alex Samad <alex@samad.com.au> wrote:
this started out as a grep quetion
trying to look at a file with out the comments in it
i tried grep -v '^\s*;' ; is the comment delimiter.
but this left me with lots of blank lines.
Hey,
Try this:
`sed -e 's:;.*::' -e ':^$:d' abc.ccp`
It removes everything from ';' to the end of the line and removes empty lines.
There's a great sed tutorial site here: http://www.grymoire.com/Unix/Sed.html
cheers,
Owen.
Reply to: