sed script to combine blank lines?
Steve Roush
csr at drutx.ATT.COM
Fri Oct 14 11:18:15 AEST 1988
# 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
More information about the Comp.unix.questions
mailing list