[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use of |&
From: |
Dennis Williamson |
Subject: |
Re: Use of |& |
Date: |
Mon, 13 Feb 2023 10:19:17 -0600 |
On Mon, Feb 13, 2023 at 9:22 AM goncholden via <help-bash@gnu.org> wrote:
> Have been using awk in a bash script.
>
> Have seen the use of "|&" rather than the usual "|". What is the reason
> for using
>
> "|&" exactly ?
>
> command |& getline info
>
> command | getline info
As Greg has said, in Bash |& is a pipe that passes both stdout and stderr.
However, the examples you show are AWK syntax (specifically gawk, perhaps)
for the creation of a coprocess as Alex has said. In this case it has
nothing to do with Bash.
https://www.gnu.org/software/gawk/manual/html_node/Two_002dway-I_002fO.html
--
Visit serverfault.com to get your system administration questions answered.
- Use of |&, goncholden, 2023/02/13
- Re: Use of |&,
Dennis Williamson <=