Re: Why can redirection be combined in an assignment statement?
From:
Andreas Kusalananda Kähäri
Subject:
Re: Why can redirection be combined in an assignment statement?
Date:
Mon, 10 May 2021 22:45:53 +0200
On Mon, May 10, 2021 at 09:23:03PM +0200, Kusalananda Kähäri wrote:
> On Mon, May 10, 2021 at 02:10:49PM -0500, Peng Yu wrote:
> > > Hm... I think that
> > >
> > > a=$(cat) <<<"hello"
> > >
> > > is exactly this. You may replace <<<"hello" by <somefile if you wish.
> >
> > Did you test it? This just hangs there. I don't think it is useful.
> >
> > --
> > Regards,
> > Peng
>
> Hmm. Yeah, that was less of a success.
I see what I was doing now. I started a zsh shell instead of a bash
shell. That syntax works in zsh. My apologies.
--
Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden
.