• coprocs in bash & ksh (Was: Different variable assignments)

    From Kenny McCormack@21:1/5 to janis_papanagnou+ng@hotmail.com on Sat Oct 19 13:39:14 2024
    In article <vf08fi$3sf5e$1@dont-email.me>,
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
    ...
    Please note that while ksh supports co-processes it doesn't use (to my >knowledge) the keyword 'coproc'. - Kornshells co-processes are invoked
    by appending the '|&' token to a command and reads and writes are done
    with 'read -p' and 'print -p', respectively.

    Seems to be pretty much the same thing, but with a slightly different
    notation (|& vs. "coproc"). I think the original bash designers wanted to
    be at least sort of "csh compatible", so they took |& from csh to mean
    "merge stdout and stderr", so had to come up with something else for
    coprocs.

    Anyway, all I know about ksh is basically what I've read from various bash sources.

    --
    "We are in the beginning of a mass extinction, and all you can talk
    about is money and fairy tales of eternal economic growth."

    - Greta Thunberg -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Kenny McCormack on Sat Oct 19 15:57:01 2024
    On 19.10.2024 15:39, Kenny McCormack wrote:
    In article <vf08fi$3sf5e$1@dont-email.me>,
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
    ...
    Please note that while ksh supports co-processes it doesn't use (to my
    knowledge) the keyword 'coproc'. - Kornshells co-processes are invoked
    by appending the '|&' token to a command and reads and writes are done
    with 'read -p' and 'print -p', respectively.

    Seems to be pretty much the same thing, but with a slightly different notation (|& vs. "coproc"). I think the original bash designers wanted to
    be at least sort of "csh compatible", so they took |& from csh to mean
    "merge stdout and stderr", so had to come up with something else for
    coprocs.

    Ah, I see. (Although "csh compatible" in scripting is, erm, somewhat disturbing.)

    Janis

    [...]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)