Let's say that I have a code like:
python <<EOF
print("abc")
EOF
and I want to assign output to bash variable. Something like:
VAR=$(python -c 'print("abc")')
Of course real python code is more complicated than print(abc) and one-liner can't be used here
So the qestion is how to assign output of first example to variable?
I tried some variations of
VAR=$(python <<EOF
print("abc")
EOF )
VAR=$(python) <<EOF
print("abc")
EOF
But this syntax is not correct