I have a list of ssh commands to run on remote server, so wrote this snippet.
#!/usr/bin/env bash
echo ''
echo "WOULD YOU LIKE TO PERFORM FILES CLEANUP: "
read choice
case $choice in
yes|YES|y|Y )
echo ''
echo "Enter NAME OR IP OF REMOTE HOST: "
read ls_host
ssh -t ${ls_host} <<- IFF
command 1
command 2
command 3
IFF;;
* )
echo "YOU'VE MADE A WISE-CHOISE: SCRIPT IS SKIPPING CLEANUP";;
esac
below error
warning: here-document at line # delimited by end-of-file (wanted `IFF')
I tried quotes around IFF also