Quantcast
Channel: Linux and Mac Hacks
Viewing all articles
Browse latest Browse all 39

Find the current directory in a bash script

$
0
0
This is a useful one line to find the current directory in a bash script:

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")"&& pwd )"

Viewing all articles
Browse latest Browse all 39

Trending Articles