title: Looping over files in a directory and using the HEAD command
body: <p>Ok so I'm trying to get my script to loop over n amount of files in a directory, and make it so that the terminal prints 3-4 lines off the top of each file that has been looped.</p>
  
  <p>Here's what I've got:</p>
  
  <pre><code> #!/bin/bash
  
   for f in $1  #for the file in the directory (Specified by user)
  
   do
  
   head $2 $f    #Print the first n lines (Specified by user) of the file.
  
   done          #finish
  </code></pre>
  
  <p>Keep getting this as an error:
  head: cannot open `3' for reading: No such file or directory</p>