bug-bash
[Top][All Lists]
Advanced

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

Why can't I say "&>&3"? Bug or feature?


From: Tim Friske
Subject: Why can't I say "&>&3"? Bug or feature?
Date: Thu, 6 Dec 2012 11:48:09 +0100

Hi folks,

why is it that I can't say:

exec 3>/dev/null
echo foobar &>&3
# Error: "-bash: syntax error near unexpected token `&'"

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?


Cheers,
Tim
--
`~~~~°<
C92A E44E CC19 58E2 FA35 4048 2217 3C6E 0338 83FC



reply via email to

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