This is related to a question I asked earlier but I would like to keep it separate in case anyone else can find use in it.
I have a command that I am running on a file called dummy.out from the command line which is as followed
vim -E -s dummy.out <<-EOF
:%s/old/new/g
:%s/old2/new2/g
:%s/old3/new3/g
:update
:quit
EOF
from the command line this is working but when I add it to my bash file bashscript.sh
#!/bin/bash
# bash script
var01="start script"
echo $var01
vim -E -s dummy.out <<-EOF
:%s/old/new/g
:%s/old2/new2/g
:%s/old3/new3/g
:update
:quit
EOF
I get the following error
warning: here-document at line 7 delimited by end-of-file (wanted 'EOF')
How would I get this command line command to run inside this bash file?