help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Differences in heredocs between process substitution and


From: grarpamp
Subject: Re: [Help-bash] Differences in heredocs between process substitution and shell substitution
Date: Sat, 19 Jul 2014 04:52:11 -0400

On Fri, Jul 18, 2014 at 9:41 PM, Philipp Schrader
<address@hidden> wrote:
> var=$(cat <<EOT
> Hello World
> EOT
> )
> echo "$var"
>
> cat <(cat <<EOT
> Hello World
> EOT
> )

Guessing the second somehow munges stdin fd. I've never seen that
usage, ie would expect to see (...) | cat. And certainly the former
var=$() before either. Why use the latter?



reply via email to

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