Re: here strings fold newlines on MacOS

2021-01-31 Thread Chet Ramey
On 1/30/21 5:44 PM, Rich Lafferty wrote: Bash Version: 5.1 Patch Level: 0 Release Status: release Description: Here strings ('<<<') fold newlines into spaces on MacOS, but not on Linux, leading to incompatibilites in bash code expected to work the same on both platforms. This was fixed quite

Re: Are these bash.v.posix diffs still useful? They _seem_ dated...

2021-01-31 Thread Chet Ramey
On 1/30/21 6:50 PM, L A Walsh wrote: Since this "https://tiswww.case.edu/php/chet/bash/POSIX"; doesn't seem to be version specific, I'm assuming these are in the latest bash version. I don't understand the benefit of the differences involving hashed-commands and recovery behavior. It seemed like

Re: here strings fold newlines on MacOS

2021-01-31 Thread Rich Lafferty
Ah, yep — sorry for the false positive. I *have* 5.1.0 installed (and bashbug picked that up!) but the context in which I encountered the bug was indeed Apple’s ancient version. I could’ve sworn I tested it in both, but clearly messed that up - verified it’s fixed in 5.1.0.   -Rich On Jan 31,

Ordering bug when handling redirection with file descriptors

2021-01-31 Thread Érico Nogueira
Hi! I have the below test case which works with dash, zsh, and has been reported to work at least up to bash 4.4.12. After 4.4.23 it definitely no longer works (I have also tested with 5.1.4). #!/bin/sh fn() { echo a >&3 } b=`fn 3>&1 1>&4 4>&-` 4>&1 With dash, it will simply exit sil

a few bugs, i hope you can read it

2021-01-31 Thread Alex fxmbsw7 Ratchev
( http://ix.io/2NUp ) - sadly i dont have the depaster ready, some loop deep logic faukts bash-5.1# n=1 bash paster $( < thefiles ) ++ paste BEGIN ++ ++ paste BEGINFILE theintro hello to this bug report, consisted as one big text file of pastes of contents of files, with the code of 'depaste' ba

Re: Ordering bug when handling redirection with file descriptors

2021-01-31 Thread Oğuz
31 Ocak 2021 Pazar tarihinde Érico Nogueira yazdı: > > #!/bin/sh > > fn() { > echo a >&3 > } > > b=`fn 3>&1 1>&4 4>&-` 4>&1 Not a bug, POSIX allows implementations to perform assignments before redirections in this case. To guarantee `4>&1' is in effect while `b=`fn 3>&1 1>&4 4>&-`' is b

Re: Ordering bug when handling redirection with file descriptors

2021-01-31 Thread Oğuz
.. but, I'm not sure about this case: $ set -o posix $ a=`uname >&4` env 4>&1 bash: 4: Bad file descriptor a= -- Oğuz

Re: Are these bash.v.posix diffs still useful? They _seem_ dated...

2021-01-31 Thread L A Walsh
On 2021/01/31 10:54, Chet Ramey wrote: On 1/30/21 6:50 PM, L A Walsh wrote: First behavior: How is it beneficial for bash to store a non-executable in the command-hash? Probably not very, but it's not all that harmful. The `checkhash' option overrides this. --- Does checkhash d