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.
On Thursday, December 06, 2012 11:48:09 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 `&'"
>
> but the following works:
>
> echo foobar &>/dev/null
> echo foobar >&3 2>&3
>
> I thin
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 fooba
On Thu, Dec 6, 2012 at 6:11 AM, Dan Douglas wrote:
>
> I don't like &> to begin with. It makes the already cryptic redirection
> syntax
> that beginners struggle to understand even more confusing by adding a
> pointless shortcut with a non-obvious meaning instead of just being
> explicit.
> If yo
On 12/6/2012 12:06 PM, DJ Mills wrote:
On Thu, Dec 6, 2012 at 6:11 AM, Dan Douglas wrote:
I don't like &> to begin with. It makes the already cryptic redirection
syntax
that beginners struggle to understand even more confusing by adding a
pointless shortcut with a non-obvious meaning instead o