Re: Delete Next Blank Line IFF Current Line is Less than 80 Characters

n22e113 <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
Note: Tried to post the following a few days ago; trying again:
>
> Does the blank line immediately follow the short line, or then can be other
> lines in between?
>
How about providing examples for both? ;-)

> If it's the former, then this should work:
>
> sed '/.\{80\}/! {
> n
> /^$/d
> }'
>
The above didn't work from inside a bash script:
#!/bin/bash
sed '/.\{80\}/! {
n
/^$/d}' file1.txt | less
Thanks!K.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.