title: Bourne Shell doesn't find unix commands on script
body: <pre><code>#!/bin/sh
  
  echo "Insert the directory you want to detail"
  read DIR
  #Get the files:
  FILES=`ls "$DIR" | sort`
  echo "Files in the list:"
  echo "$FILES"
  echo ""
  echo "Separating directories from files..."
  for FILE in $FILES
  do
      PATH=${DIR}"/$FILE"
      OUTPUT="Path: $PATH"
      if [ -f "$PATH" ]; then
          NAME=`echo "$FILE" | cut -d'.' -f1`
          OUTPUT=${OUTPUT}" (filename: $NAME"
          EXTENSION=`echo "$FILE" | cut -s -d'.' -f2`
          if [ ${#EXTENSION} -gt 0 ]; then
              OUTPUT=${OUTPUT}" - type: $EXTENSION)"
          else
              OUTPUT=${OUTPUT}")"
          fi
      elif [ -d "$PATH" ]; then
          OUTPUT=${OUTPUT}" (dir name: $FILE)"
      fi
      echo "$OUTPUT"
  done
  </code></pre>
  
  <p>I get this output when running it (I ran using relative path and full path)</p>
  
  <pre><code>$ ./problem.sh
  Insert the directory you want to detail
  .
  Files in the list:
  directoryExample
  problem.sh
  
  Separating directories from files...
  Path: ./directoryExample (dir name: directoryExample)
  ./problem.sh: cut: not found
  ./problem.sh: cut: not found
  Path: ./problem.sh (filename: )
  $ 
  $ 
  $ ./problem.sh
  Insert the directory you want to detail
  /home/geppetto/problem
  Files in the list:
  directoryExample
  problem.sh
  
  Separating directories from files...
  Path: /home/geppetto/problem/directoryExample (dir name: directoryExample)
  ./problem.sh: cut: not found
  ./problem.sh: cut: not found
  Path: /home/geppetto/problem/problem.sh (filename: )
  $
  </code></pre>
  
  <p>As you can see I received "<code>cut: not found</code>" two times when arranging the output string of file types. why? (I am using Free BSD)</p>