title: ls and grep command "not found" error in shellscript
body: <p>I wonder why "not found" error in my shellscript written in below, so please tell me my mistake in this code.(environment:mac OS X and CentOS6)</p>
  
  <p>"xaf.sh"</p>
  
  <pre><code>#!/bin/sh
  SERVER=$1
  USER=$2
  PASS=$3
  FILE=$4
  PATH=$5
  
  echo $1
  VAR=`ls | grep ${FILE}`
  
  for one_file in ${VAR}; do
      echo $one_file
      echo "go"
      touch ./ftp_err/log
  
      ftp -nv　2&gt;./ftp_err.log &lt;&lt;END
          open $SERVER
          user $USER $PASS
          cd /$PATH
          binary
          prompt
          put ${one_file}
      exit
  END
  
      VAR2=`wc ./ftp_err.log`
      if [VAR2 -gt 0 ] ; then
          echo "you have an error in sending ${one_file}"
      else
          echo "you have succeeded Transfer of ${one_file}"
          rm ${one_file}
      fi
      rm ./ftp_err.log
  done
  </code></pre>
  
  <p>...and command how I issued and the result of execution is as below(part of username and password is replaced by #)</p>
  
  <pre><code>**Command**
  ./xaf.sh 192.168.202.171 #r#####er c#####b## 2 /tmp/
  
  **Result**
  ./xaf.sh: line 9: ls: command not found
  ./xaf.sh: line 9: grep: command not found
  </code></pre>