Display the absolute path to a file or directory.
$ realpath /path/goes/../here
-
Download the source code:
$ curl -LO https://github.com/dtjm/realpath/raw/master/realpath.c -
Compile the source code:
$ gcc -o realpath realpath.c -
Put it somewhere in your path:
$ sudo install -m0755 realpath /usr/local/bin
Adam Liss, August, 2007 http://stackoverflow.com/questions/284662/how-do-you-normalize-a-file-path-in-bash
This program is provided "as-is" to the public domain, without express or implied warranty, for any non-profit use, provided this notice is maintained.