help-bash
[Top][All Lists]
Advanced

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

Re: sub-process changing value available to parent process?


From: Greg Wooledge
Subject: Re: sub-process changing value available to parent process?
Date: Mon, 6 Apr 2020 08:26:25 -0400
User-agent: Mutt/1.10.1 (2018-07-13)

On Mon, Apr 06, 2020 at 09:17:58AM +0200, Sylvain Viart wrote:
> Sorry, I realized I omitted this important information: I want to assign
> multiple values which are set by the child process.

You already KNOW the answer.  Use eval on the captured output.

Also, as always, use quotes correctly.

eval "$(child)"

> set -euo pipefail

As soon as I saw this, I decided to delete the entire thread.  This
is not salvageable.  This is a sign of grave incompetence and/or
ignorance.  Combined with "I know the answer is eval but I want a
different answer", it points to intransigent stubbornness.



reply via email to

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