I want to send a heredoc command like this one
cat <<EOF
line 1
line 2
EOF
to background. (The actual command is openssl
with many lines of input which takes some time to complete).
The command needs to be storable in string so that I could exec
it in PHP.
Simply appending an ampersand doesn't work:
cat <<EOF
line 1
line 2
EOF &
Any other combinations I tried (putting the command in brackets etc.) don't work either.
How?