I want to transform /foo/bar/.. to /foo

Is there a bash command which does this?


Edit: in my practical case, the directory does exist.

24 Answers
24

Leave a Reply

Your email address will not be published. Required fields are marked *