You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a snippet or screenshot that shows the problem:
#!/bin/bash
coproc tr { tr a b; }
echo aaa >&"${tr[1]}"exec {tr[1]}>&- # errors here
cat <&"${tr[0]}"
Here's what shellcheck currently says:
Line 6 SC2093: Remove "exec " if script should continue after this command.
Line 6 SC1083: This { is literal. Check expression (missing ;/\n?) or quote it.
Line 6 SC1083: This } is literal. Check expression (missing ;/\n?) or quote it.
Here's what I wanted or expected to see:
Expected no errors. exec {tr[1]}>&- works correctly on bash version 5.2.37.
According to this SE answer this syntax is not valid in bash versions prior to 4.3. https://unix.stackexchange.com/a/86372
For bugs
shellcheck --version
or 'online'): onlineFor new checks and feature suggestions
Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
Expected no errors.
exec {tr[1]}>&-
works correctly on bash version 5.2.37.According to this SE answer this syntax is not valid in bash versions prior to 4.3.
https://unix.stackexchange.com/a/86372
Also relevant bash change log entry.
https://git.savannah.gnu.org/cgit/bash.git/tree/CWRU/changelog?id=30a978b7d808c067219c95be88c4979b6a7aa251#n3427
The text was updated successfully, but these errors were encountered: