Sujet : Re: Different variable assignments
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.unix.shellDate : 19. Oct 2024, 13:52:01
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vf0a1h$3sn0s$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 19.10.2024 13:45, Kenny McCormack wrote:
In article <vec3qb$3q4ms$3@dont-email.me>,
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On Fri, 11 Oct 2024 22:50:10 +0200, Frank Winkler wrote:
>
... but it still doesn't solve the issue that I need the result to be
visible in the parent shell.
>
coproc { uname -sr; }
read -u ${COPROC[0]} var3
wait $COPROC_PID
echo $var3
I'm actually a fan of "coproc" in bash, and I use it in my scripting, but I
think it is overkill in most cases. [...]
Also, if above code is how to use co-processes in Bash, I consider
that extremely clumsy (if compared to, say, Ksh).
(Mileages may vary, of course.)
Janis