Re: [PATCHv2] am: fix patch format detection for Thunderbird "Save As" emails

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

 



On 12/18/2009 02:42 PM, Eric Blake wrote:
Stephen Boyd<bebarino<at>  gmail.com>  writes:
echo and \ do not portably mix.  For that matter, shell double quotes and
backslash escapes that are not required by POSIX do not portably mix.

Thanks. Hopefully squashing this in will make it even more portable?

+               printf "X-Fake-Field: Line One\015\n"&&

Nope.  You need either "\\015\\n" or '\015\n', since "\015" and "\n" are both
undefined in portable shell.

So, how about this?

        {
                echo "X-Fake-Field: Line One"&&
                echo "X-Fake-Field: Line Two"&&
                echo "X-Fake-Field: Line Three"&&
                git format-patch --stdout first | sed -e "1d"
        } | sed -e "s/$/;/" | tr "'";"'" "'"\015"'">  patch1-crlf.eml

Or maybe this?

        {
                echo "X-Fake-Field: Line One"&&
                echo "X-Fake-Field: Line Two"&&
                echo "X-Fake-Field: Line Three"&&
                git format-patch --stdout first | sed -e "1d"
        } | sed -e "s/$/;/" | tr ";" "\\015">  patch1-crlf.eml

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]