sed ? question

rkc rkc at XN.LL.MIT.EDU
Fri May 26 06:57:12 AEST 1989


I have an application where I want to run a file through cpp and then 
strip that file of all the nasties that cpp generates, namely:
	1. Lines beginning "# line number info "
and 	2. The many blank lines.
It seems to me that sed should be able to do this for me--but I'm not sure how to go
about it.  I can get sed to do #1 by using the script:
	sed /^#/,/\n/d filename
but I can't figure out how to do #2.  Surely there is a sed guru out there who
can help me...(Add other pitiful cries for help.)
	Please e-mail responses, as I do not read this newsgroup.
	Thanks,
	 -Rob



More information about the Comp.unix.questions mailing list