title: conditional binary operator expected error when the file is empty in shell script
body: <p>i have a file called MYNAME in path /root/user/
  which has some value say SSS_14_10_1992</p>
  
  <p>when the values exists in file the below code works fine
  <strong>but when the file is empty , then the below mentioned error is thrown</strong></p>
  
  <p>i am reading this value from file and matching it wildcard and doing something , when the file has some value the below code works fine , when the file is empty then i am getting conditional error</p>
  
  <p>Below is my code</p>
  
  <pre><code>var=$(cat /root/user/MYNAME)
  
  echo $var
  
  su - uname&lt;&lt;!
  pwd
  
  if  [ -z "$var" ]; then
     echo "NAME SHOULD BE PROVIDED IN MYNAME FILE"
  else
     if [[ $var == SSS_14_10* ]]
       then
       echo "value is matched"
     else
       echo "value has not matched"
     fi
  fi
  !    
  </code></pre>
  
  <p>when the file is empty
  i am getting the below error:</p>
  
  <pre><code>: conditional binary operator expected
  : syntax error near `SSS_14_10*'
  : `   if [[  == SSS_14_10* ]]'
  </code></pre>