Created
January 8, 2015 17:14
-
-
Save fitnr/e4f95ce417fb8e11bfa7 to your computer and use it in GitHub Desktop.
Bash script to get an absolute filename from a relative filename
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 | |
# $1 : relative filename | |
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