Created
January 3, 2020 19:18
-
-
Save ezhov-da/20778cb82c5276766a42ae06abbae98e to your computer and use it in GitHub Desktop.
Получение абсолютного пути к скрипту для запуска
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
==> https://stackoverflow.com/questions/24112727/relative-paths-based-on-file-location-instead-of-current-working-directory | |
#!/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