Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!tank!ncar!mailrus!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.unix.questions Subject: Re: sed script to combine blank lines? Keywords: sed Message-ID: <4298@bsu-cs.UUCP> Date: 12 Oct 88 23:34:21 GMT Article-I.D.: bsu-cs.4298 References: <192@vlsi.ll.mit.edu> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Distribution: comp Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 15 In article <192@vlsi.ll.mit.edu> young@vlsi.ll.mit.edu (George Young) writes: >I often want to take a big ascii file >(like a .c file after cc -E) and collapse each group of 'blank' lines >into exactly one blank line. 'Blank' here is any combination of blanks, >tabs and maybe ^L's. Under 4.3BSD, "cat -s" does this, except that I don't know if it also considers ^L to be a blank line. Also, for screen displays only, "less" has an option to do the same. I've never been able to make sed work with patterns that span newlines. -- Rahul Dhesi UUCP: !{iuvax,pur-ee}!bsu-cs!dhesi