help-bash
[Top][All Lists]
Advanced

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

Re: Do `>& -` and `<& -` also work?


From: Chet Ramey
Subject: Re: Do `>& -` and `<& -` also work?
Date: Fri, 14 May 2021 11:39:54 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.1

On 5/14/21 10:46 AM, Koichi Murase wrote:

or « exec 4>&$fd- », in
which the file descriptor and - are clearly not the part of the
redirection operator.

Bash can know a problem for this case.

Oh, OK. Thank you. I didn't know we can't write in this way.

You can, but $fd has to expand to a number. This operator is used to
move file descriptors.

https://lists.gnu.org/archive/html/help-bash/2021-05/msg00062.html

--
``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/



reply via email to

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