[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ordering bug when handling redirection with file descriptors
From: |
Chet Ramey |
Subject: |
Re: Ordering bug when handling redirection with file descriptors |
Date: |
Mon, 1 Feb 2021 09:57:17 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 |
On 2/1/21 12:32 AM, Oğuz wrote:
.. but, I'm not sure about this case:
$ set -o posix
$ a=`uname >&4` env 4>&1
bash: 4: Bad file descriptor
a=
Bash always performs word expansions and variable assignments preceding
commands before redirections, and always has. I'm not changing it now,
after 30 years.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/