SOLVED: Capturing file descriptor 3, or alternatives.
Bill Freeman
ke1g.nh at gmail.com
Tue Jun 26 10:12:09 EDT 2012
On Tue, Jun 26, 2012 at 8:01 AM, Ben Scott <dragonhawk at gmail.com> wrote:
> P.S. to the P.P.P.S.:
>
> On Tue, Jun 26, 2012 at 7:55 AM, Ben Scott <dragonhawk at gmail.com> wrote:
>> I kept trying this one-liner:
>>
>> ANSWER=$( ( dialog --output-fd 3 --inputbox 'Speak Friend and enter' 0
>> 0 > /dev/fd/4 ) 3>&1 4>&1 )
>
> This may make the redirection I'm talking about clearer:
>
> ANSWER=$( ( dialog --output-fd 3 --inputbox 'Speak Friend and enter' 0
> 0 1>/dev/fd/4 ) 3>&1 4>&1 )
>
> It specifies the stdout file descriptor explicitly for the
> redirection of the dialog(1) process.
Thanks, Ben. The {NAME}> syntax and the command-less exec are new to
me too. It sounds like this is generally useful.
More information about the gnhlug-discuss
mailing list