Re: repair comb-quoting
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <[email protected]> |
sed -e '
# v3.0
# skip uncited, last, & small lines
/^>/!b
$q
/.\{30\}./!b
N
/^\(\(> \)\2*\)[^>].*\n\1[^>]/!{P;D;}
/\n\(> \)\1*$/b
/\n>.\{30\}./{P;D;}
/^>.\{50\}.*\n/s/\n\(> \)\1*//
' comb_quoted_file
can be made into a 1-liner by putting each uncommented line above in an -e '....' block, to get as many -e '...' blocks as the number of lines.
[Non-text portions of this message have been removed]