sed ? question

funk at osiris.cso.uiuc.edu funk at osiris.cso.uiuc.edu
Sat May 27 05:26:00 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 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.)

Try  sed "/^ *$/d"
That will delete all lines consisting of  (only) any number of blnks

-------------------------------------------------------------------------------
|        Bruce Funk                         INTERNET: funk at osiris.cso.uiuc.edu |
|ACSEH, 21st TAACOM          __________________________________________________|
|Kaiserslautern, W. Germany  | Any resemblance between me and reality          |
|(guesting on osiris)        | is strictly coincidental                        |
-------------------------------------------------------------------------------



More information about the Comp.unix.questions mailing list