title: Comparing two values in shell script with hadoop
body: <p>I want to check the directory availability in shell:</p>
  
  <pre><code>mypath=${BASELOGDIR}/${entity}/${YEAR}/${MONTH}/${DATE}
  path2_check=`hdfs dfs -ls -d ${mypath} | awk '{print $2}'|head -1`
  
  if [$path2_check -eq 1]; then
      echo ${path1_check}"availble"
  fi
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <pre><code>error :[1: command not found
  </code></pre>