This question already has an answer here:
- Bash: How to avoid warning: here-document at line XX delimited by end-of-file (wanted `EOM') [duplicate] 2 answers
- here-document gives 'unexpected end of file' error 5 answers
I want to assign a variable after executing the set of commands The first command is to get into the shell of the openshift pod. Then cat a file and assign that to a variable outside the openshift container.
I tried it like this
check=$(oc rsh pod << EOF
cat /var/lib/jenkins/.ssh/check.pub
EOF)
It gives me an error
bash: warning: here-document at line 41 delimited by end-of-file (wanted `EOF')