Created
July 7, 2020 01:25
-
-
Save justanotherdot/7eab87f1001654db7eee73c1ad25cd4a to your computer and use it in GitHub Desktop.
Show an absolute path given a relative path in a POSIX compliant way.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -eu | |
echo "$(cd "$(dirname "$1")"; pwd)/$(basename "$1")" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment