Re: repair comb-quoting

"[email protected] [sed-users]" <[email protected]> 22 Jan 2016 13:56:54 -0800
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]