h8mmer
1
I'm trying to run the logic below but get a `<' is not matched error message when I return a Y or y;
printf "Run this [Y/N]? : "
read RESP
case $RESP in
Y|y)
cat <<EOF > file
today is Monday
EOF ;;
N|n)
exit 1 ;;
esac
Any ideas?
Scott
2
Move the ;; to a new line, and either put EOF at the beginning of the line, or indent it with a tab (i.e. not with spaces):
printf "Run this [Y/N]? : "
read RESP
case $RESP in
Y|y)
cat <<EOF > file
today is Monday
EOF
;;
N|n)
exit 1 ;;
esac