title: Loop through files in a given directory
body: <p>I am trying to loop through every file in a user specified directory.
  Here's my code:</p>
  
  <pre><code>clear
  echo "enter the directory path: \n"
  read directory
  for file in $directory; do
      echo $file
  done
  </code></pre>
  
  <p>My input, e.g.: <code>/home/user/Downloads</code></p>
  
  <p>Output I get: <code>/home/user/Downloads</code></p>
  
  <p>If I use </p>
  
  <pre><code>clear
  for file in *; do
      echo $file
  done
  </code></pre>
  
  <p>It works, but it shows only the contenets of current directory</p>