[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] m_getfld() bug fix

From: Robert Elz
Subject: Re: [Nmh-workers] m_getfld() bug fix
Date: Sun, 08 Dec 2013 12:40:55 +0700

    Date:        Sat, 07 Dec 2013 21:35:28 -0500
    From:        David Levine <address@hidden>
    Message-ID:  <address@hidden>

  | Ah, but it busts on Solaris:

  | What's your sed equivalent of cat -s?

Sed would be a bit messier, but you really don't need it, just
slightly "less concise" awk should work, anywhere ... Try

awk 'length($0) == 0 && e == 1 { next }
        { e = length($0) == 0 }
        { print }'

which is the exact same thing as before, just less shortcuts.
(The indentation isn't important.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]