help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] redirection again and again and ...


From: Greg Wooledge
Subject: Re: [Help-bash] redirection again and again and ...
Date: Wed, 13 Mar 2013 10:36:41 -0400
User-agent: Mutt/1.4.2.3i

On Wed, Mar 13, 2013 at 09:26:53AM -0500, address@hidden wrote:
> From coproc.bash
> echo "$@" >&61
> builtin read "$@" <&62

This is a file descriptor duplication; cf. echo "an error message" >&2
or commandA 2>&1 | commandB

> Why not
> echo "$@" >61
> builtin read "$@" <62

Redirecting >61 creates or truncates a file named "61".  Redirecting <62
attempts to read from a file named "62", or generates an error if it does
not exist.

Redirecting >&61 causes stdout to be (temporarily) a duplicate of the
existing file descriptor #61.  Redirecting <&62 causes stdin to be
(temporarily) a duplicate of file descriptor #62.



reply via email to

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