Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bbn!csd4.milw.wisc.edu!uxc!uxc.cso.uiuc.edu!ux1.cso.uiuc.edu!osiris.cso.uiuc.edu!funk From: funk@osiris.cso.uiuc.edu Newsgroups: comp.unix.questions Subject: Re: sed ? question Message-ID: <9700004@osiris.cso.uiuc.edu> Date: 26 May 89 19:26:00 GMT References: <1415@xn.LL.MIT.EDU> Lines: 18 Nf-ID: #R:xn.LL.MIT.EDU:1415:osiris.cso.uiuc.edu:9700004:000:982 Nf-From: osiris.cso.uiuc.edu!funk May 26 14:26:00 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@osiris.cso.uiuc.edu | |ACSEH, 21st TAACOM __________________________________________________| |Kaiserslautern, W. Germany | Any resemblance between me and reality | |(guesting on osiris) | is strictly coincidental | -------------------------------------------------------------------------------