title: I want to write a script that searches all directories in $PATH with the find or ls command
body: <p>total newbie here.  I would like to write a bash script that will allow me to perform a find or ls command on all of the directories in $PATH.  I would need it to take a search string, and run either find or ls (I don't know which is better) on all of the directories that are returned from $PATH.  Thanks!</p>
  
  <p>What I have so far:</p>
  
  <pre><code>arr=$(echo $PATH | tr ":" "\n")
  
  echo -n "SEARCH STRING:"
  read STRING
  
  for x in $arr
  do
      find /"$x" -iname "$STRING"
  done
  </code></pre>