Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ezhov-da/20778cb82c5276766a42ae06abbae98e to your computer and use it in GitHub Desktop.
Save ezhov-da/20778cb82c5276766a42ae06abbae98e to your computer and use it in GitHub Desktop.
Получение абсолютного пути к скрипту для запуска
==> 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