read A
if [["$A" == 'Y' -o "$A" =='y']]
then echo "YES"
else echo "NO"
fi
I am very new to shell scripting.basically, i am trying to check if the input is Y
or y
.
I am getting the following error which I am not able to debug.
solution.sh: line 2: [[Y: command not found
Thanks.