title: How do you normalize a file path in Bash?
body: <p>I want to transform <code>/foo/bar/..</code> to <code>/foo</code></p>
  
  <p>Is there a bash command which does this?</p>
  
  <hr>
  
  <p>Edit: in my practical case, the directory does exist.</p>