Why doesn't this work?
Code:
cat | myvar=$(</dev/stdin) <<EOS
This is some content
EOS
echo "$myvar"
i have also tried several variants of cat in place of the redirection.
Code:
$(cat -)
$(cat)
$(cat /dev/stdin)
None of the variants print "This is some content"
I have a version that works:
Code:
myvar=$(cat <<EOS
This is some content
EOS
)
echo "$myvar"
but i don't like the syntax and it doesn't play nice in my editor with code folding.
Thanks!