title: How do I get the absolute directory of a file in Bash?
body: <p>I have written a Bash script that takes an input file as an argument and reads it.<br />
  This file contains some paths (relative to its location) to other files.</p>
  <p>I would like the script to go to the folder containing the input file, to execute further commands.</p>
  <p>In Linux, <strong>how do I get the folder (and just the folder) from an input file?</strong></p>