title: head command to skip last few lines of file on MAC OSX
body: <p>I want to output all lines of a file, but skip last 4, on Terminal.</p>
  
  <p>As per UNIX man page following could be a solution.</p>
  
  <p><code>head -n -4 main.m</code></p>
  
  <p><b>MAN Page:</b></p>
  
  <blockquote>
    <p>-n, --lines=[-]N
              print  the first N lines instead of the first 10; with the lead-
              ing '-', print all but the last N lines of each file</p>
  </blockquote>
  
  <p><p>I read man page here. <a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?head" rel="noreferrer">http://unixhelp.ed.ac.uk/CGI/man-cgi?head</a><br></p>
  
  <p>But on MAC OSx I get following error.</p>
  
  <blockquote>
    <p>head: illegal line count -- -4</p>
  </blockquote>
  
  <p>What else can be done to achieve this goal? </p>