title: How to make argument checking loop in csh
body: <p>I try to make script in c-shell which is checking if it is called with -g or -h arguments. If it is called with some other argument it should simply echo "Wrong argument". The problem is that when I run script with -s etc my r value isn't True and I have "if: no file name" error in console. Here's my loop:</p>
  
  <pre><code>foreach a ($argv)
      if (( $a == '-h' ) || ( $a == '--help' )) then
          set h=True
      else if (( $a == '-q' ) || ( $a == '--quiet' )) then
          set q=True
      else
          set r=True
      endif
  end
  </code></pre>
  
  <p>Thanks in advance.</p>