Created
February 26, 2020 21:05
Bash script shell script get script path of the file to solve relative path issue when you run the command
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 | |
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | |
echo $SCRIPTPATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment