title: How to use OR condition inside tcsh if statement
body: <p>I am trying to use an OR condition inside an IF statement in tcsh shell. Same statement works in CSH. </p>
  
  <h1>Example statement: (cat tesh.sh)</h1>
  
  <pre><code>if [ "$1" == "hi" -o "$2" == "hello" ];then
  echo hi
  else
  echo hello
  fi
  </code></pre>
  
  <h1>Now if I execute this sample script I get the following errors:</h1>
  
  <pre><code>[35] % sh -x test hi hi hello
  + test hi hi hello
  test[7]: hi: A test command parameter is not valid.
  + exit 1
  [36] % sh -x test hi hi
  + test hi hi
  test[7]: test: Specify a parameter with this command.
  + exit 1
  [37] % sh -x test hi hello
  + test hi hello
  test[7]: test: Specify a parameter with this command.
  + exit 1
  [38] % sh -x test hi hello
  + test hi hello
  test[7]: test: Specify a parameter with this command.
  + exit 1
  [39] %
  </code></pre>
  
  <p>Please suggest what can be done?</p>
  
  <h1>Additional Info:</h1>
  
  <pre><code>[44] % uname -s
  HP-UX
  [45] %
  [45] % echo $SHELL
  /bin/tcsh
  [46] %
  </code></pre>
  
  <h1>More example:</h1>
  
  <pre><code> cat new_test.txt
  if ([ $1 == 1 ] || [ $2 == 1 ])
  then
  echo $1 and $2
  fi
  
  ./new_test.txt 1 1
  ./new_test.txt: ==: A test command parameter is not valid.
  ./new_test.txt: ==: A test command parameter is not valid.
  </code></pre>
  
  <h1>More Example:</h1>
  
  <pre><code> cat suggested.sh
  
  if (($1 == 1) || ($2 == 1)) ; then echo "$1 and $2" ; fi
  
   ./suggested.sh 1 1
  ./suggested.sh: 1:  not found.
  ./suggested.sh: 1:  not found.
  </code></pre>