title: Why am I getting "non -option ARGV element: XXXX" in shell script?
body: <p>I'm trying to make a file for login into cyberoam client in Linux.</p>
  
  <p>crclient is a file which takes different arguments.
  <code>./crclient -u username</code> for login and <code>./crclient -l</code> for logout.
  The shell script which I have written is working fine for login but when I'm trying to logout as <code>./crclient -l</code> terminal is showing 
      <code>non-option ARGV-elements: u09me215</code>.</p>
  
  <pre><code>#!/bin/sh
  cd Downloads/crclient
  if [ $1=="-u" ]
  then
  ./crclient $1 u09me215
  else
  ./crclient $1
  fi
  </code></pre>
  
  <p>Now script is running correctly after replacing <code>if [ $1=="-u" ]</code> with <code>if [ $1 = "-u" ]</code> as @devnull pointed.
  But what is difference between "==" and "=" other than one is used for comparisons and other one is used for value assigning. And why <code>==</code> was working good for <code>-u</code> and not for <code>-l</code>.</p>