Re: [PATCHv2] am: fix patch format detection for Thunderbird "Save As" emails
On 12/18/2009 02:42 PM, Eric Blake wrote:
Show 10 quoted lines
> 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.emlOr 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