help-bash
[Top][All Lists]
Advanced

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

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


From: Koichi Murase
Subject: Re: Do `>& -` and `<& -` also work?
Date: Sat, 15 May 2021 01:01:36 +0900

2021年5月15日(土) 0:39 Chet Ramey <chet.ramey@case.edu>:
> 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

Ah, thank you for the clarification! OK. Peng has still talked about
">&-" which will be resulted from the empty value fd=. Thank you.

--
Koichi



reply via email to

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