bug-bash
[Top][All Lists]
Advanced

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

Re: here strings fold newlines on MacOS


From: Lawrence Velázquez
Subject: Re: here strings fold newlines on MacOS
Date: Sat, 30 Jan 2021 21:36:28 -0500

> On Jan 30, 2021, at 9:28 PM, "" <kfm@plushkava.net> <kfm@plushkava.net> wrote:
> 
> Are you certain that you're not testing /bin/bash (version 3.2.57) in the 
> case of macOS? I ask because the bug you describe is said to have been 
> addressed by the release of 4.4-beta [1].
> 
> z.  Bash no longer splits the expansion of here-strings, as the
>    documentation has always said.


I can reproduce the OP's result with the system bash but not with 5.1
or 5.1 patch 4.


% /bin/bash --version | head -n 1
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)
% /bin/bash -c 'od -bc <<< $(echo -e "foo\nbar")'
0000000   146 157 157 040 142 141 162 012
           f   o   o       b   a   r  \n
0000010


% work/destroot/opt/local/bin/bash --version | head -n 1
GNU bash, version 5.1.0(1)-release (x86_64-apple-darwin18.7.0)
% work/destroot/opt/local/bin/bash -c 'od -bc <<< $(echo -e "foo\nbar")'
0000000   146 157 157 012 142 141 162 012
           f   o   o  \n   b   a   r  \n
0000010


% bash --version | head -n 1
GNU bash, version 5.1.4(1)-release (x86_64-apple-darwin18.7.0)
% bash -c 'od -bc <<< $(echo -e "foo\nbar")'
0000000   146 157 157 012 142 141 162 012
           f   o   o  \n   b   a   r  \n
0000010


--
vq


reply via email to

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