This code generates a error line 3: [: missing `]'. So please anyone tell me that why i am I getting such error.I am new in bash scripting.?
#!/bin/bash
read x
if [ $x == "Y" ] || [ $x == "y"]
then
   echo "YES"
else
   echo "NO"
fi
Thanks in advance.