On 12/6/12 5:48 AM, Tim Friske wrote:
> Hi folks,
> 
> why is it that I can't say:
> 
> exec 3>/dev/null
> echo foobar &>&3
> # Error: "-bash: syntax error near unexpected token `&'"

Because the shorthand &> wasn't extended to arbitrary file descriptors.

> but the following works:
> 
> echo foobar &>/dev/null
> echo foobar >&3 2>&3
> 
> I think the succinct notation "&>&N" where N is some numbered file
> descriptor should work also. Is this behavior a bug or feature?

It's simply a feature that was never implemented because there was
little or no demand.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to