Replying to emails: how to condense multiple "blank" (not really blank; lines consisting only of ">") lines into one?
sed, unix
Solution
Assuming that each visual line is a proper logical line (string of characters ended with a `\n`), you can dispense with the rest of the tools and simply run `uniq(1)` on the input.
Example follows.
% cat tst
>Hi Everyone,
>
>
>
>I love spaces.
>
>
>
>That's all.
% uniq tst
>Hi Everyone,
>
>I love spaces.
>
>That's all.
%
Problem
I'm trying to do something like this but for quoted emails, so this ``` On 2014-07-11 at 03:36 PM, <ilovespaces@email.com> wrote: >Hi Everyone, > > > >I love spaces. > > > >That's all. ``` Would become this ``` On 2014-07-11 at 03:36 PM, <ilovespaces@email.com> wrote: >Hi Everyone, > >I love spaces. > >That's all. ``` Thanks