Path: utzoo!utgpu!water!watmath!clyde!att!mtuxo!mtgzz!drutx!csr From: csr@drutx.ATT.COM (Steve Roush) Newsgroups: comp.unix.questions Subject: Re: sed script to combine blank lines? Keywords: sed Message-ID: <8984@drutx.ATT.COM> Date: 14 Oct 88 01:18:15 GMT References: <192@vlsi.ll.mit.edu> Distribution: comp Organization: AT&T, Denver, CO Lines: 21 # strip 1st blank line down to nothing, then print newline # s/.*//p should work, but not on my version # append next line, then strip thru newline, finally loop to see if non-blank ############# NOTE, replace ^L with the real thing sed '/^[ ^L]*$/{ s/.*// p :bogus /^[ ^L]*$/{ N s/.*\n// bbogus } }' steve roush AT&T - BTL Denver 303-538-4860 drutx!csr