Hi Greg,
> Date: 2026-10-07 08:26:30-0400
> From: Greg Wooledge <greg@wooledge.org>
>
> On Wed, Oct 07, 2026 at 09:51:01 +0200, Alejandro Colomar wrote:
> > I'm trying to have a here document used within $() which itself is
> > passed to eval(1).
>
> *Shudder*
>
> > Here's a minimal example of what I want:
> >
> > eval $(cat <<'__EOF__');
> > echo foo;
> > __EOF__
>
> The closing parenthesis has to be after the __EOF__, on a new line.
>
> eval $(cat <<'__EOF__'
> echo foo
> __EOF__
> )
>
> I have *no idea* how eval is going to interact with all that, so it's
> all on you.
Hmmm, for the trivial example, it seems to work, but for my real case it
seems it doesn't. I've decided to first write to a file, then eval the
cat of the file.
Thanks for the help!
Have a lovely night!
Alex
--
<https://www.alejandro-colomar.es>