bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] gawk and inherited file descriptors


From: arnold
Subject: Re: [bug-gawk] gawk and inherited file descriptors
Date: Mon, 02 Nov 2015 06:53:18 -0700
User-agent: Heirloom mailx 12.4 7/29/08

Hi.

Thanks for your report.

Howard Bryden <address@hidden> wrote:

> Guys,
>
> I'm using gawk 4.1.3 under HP-UX 11.31 (POSIX shell) and I wonder if
> I'm missing something.

Indeed, you are. :-)

> The shell fragment
>
> exec 9<&1

This only changes the shell's file descriptors, not those of commands
it runs. Additionally, you should be using 9>&1 for output.

The following works for me on Linux:

        $ gawk 'BEGIN { print "hi" > "/dev/fd/9" }' 9>&1
        hi

I suspect that it will also work for you on HP/UX.

Thanks,

Arnold



reply via email to

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