My code:
#!/bin/sh
#filename:choose.sh
read choose
[ "$choose" == "y" -o "$choose" == "Y" ] && echo "Yes" && exit 0
[ "$choose" == "n" -o "$choose" == "N" ] && echo "No" && exit 0
echo "Wrong Input" && exit 0
But when I execute
sh ./choose.sh
terminal prompt me that
[: 4: n: :Unexpected operator
[: 5: n: :Unexpected operator
Is there any mistake in my bash script? Thanks!