[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: |
Mon, 10 May 2021 15:22:38 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
On 5/10/21 10:12 AM, Peng Yu wrote:
Hi,
The manual only mentions `>&-` and `<&-`. Do `>& -` and `<& -` also work?
The first sentence is not true. That misunderstanding colors the question.
The manual (and POSIX) talks about [N]>&WORD and [N]<&WORD. WORD is a
separate token that is subject to expansion, and a token can be
separated from the previous token by one or more spaces. `-' is one
of the values for an expanded WORD for which the behavior is defined.
I tried the following and I don't see errors. But I can not be sure
whether `>& -` and `<& -` are exactly the same as `>&-` and `<&-`.
They are.
If they both work, is this made by design?
Yes. It's required.
--
``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/
- Re: Do `>& -` and `<& -` also work?, (continued)
- Re: Do `>& -` and `<& -` also work?, Chet Ramey, 2021/05/12
- Re: Do `>& -` and `<& -` also work?, Peng Yu, 2021/05/12
- Re: Do `>& -` and `<& -` also work?, Chet Ramey, 2021/05/12
- Re: Do `>& -` and `<& -` also work?, Koichi Murase, 2021/05/14
- Re: Do `>& -` and `<& -` also work?, Chet Ramey, 2021/05/10
- Re: Do `>& -` and `<& -` also work?, Chet Ramey, 2021/05/10
Re: Do `>& -` and `<& -` also work?,
Chet Ramey <=