On Sun, Apr 13, 2008 at 11:22:13AM +1000, Owen Townend wrote: > On 13/04/2008, Alex Samad <[EMAIL PROTECTED]> 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`
yeah but it still leave the empty lines, you can join -e together with ; sed -e 's:;.*::;:^$:d' <file> > 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. -- "As a matter of fact, I know relations between our governments is good." - George W. Bush 11/08/2005 Washington, DC On U.S.-South Korean relations
signature.asc
Description: Digital signature