Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!wb3ffv!fallst!tkevans From: tkevans@fallst.UUCP (Tim Evans) Newsgroups: comp.unix.questions Subject: Deleting (Only) First Blank Line in File Message-ID: <1651@fallst.UUCP> Date: 29 Jun 90 02:40:56 GMT Distribution: comp Organization: Fallston, MD Lines: 14 Can someone help me to delete the _first_ occurring blank line of a file (whereever it occurs) without deleting subsequent ones? You'd think the following would work, but it doesn't: sed 's/^$//1' foo > newfoo Solutions other than those using 'perl' are preferred. Thanks -- UUCP: {rutgers|ames|uunet}!mimsy!woodb!fallst!tkevans INTERNET: tkevans%fallst@wb3ffv.ampr.org Tim Evans 2201 Brookhaven Ct, Fallston, MD 21047