Created
May 3, 2017 10:34
-
-
Save timlianov/90f073e1daa2d8c52fc773689966a6ac to your computer and use it in GitHub Desktop.
Relative paths based on file location instead of current working directory
This file contains hidden or 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/bash | |
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) | |
cd "$parent_path" | |
cat ../some.text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment