Quantcast
Channel: nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED)
Viewing all articles
Browse latest Browse all 2612

Linux / Unix: Shell Script Find Out In Which Directory Script File ResidesFrequently Asked Questions About Linux / UNIX

$
0
0
I need to find out in which directory my bash script resides so that I can read config file called .backup .ignore .target. For example, if my script resides in >/home/foo/script.sh, I need to read /home/foo/.{backup,ignore,target} files. How do I find out the current directory location and shell script directory location in Bash running on Linux or Unix like operating systems?

Read answer to: "Linux / Unix: Shell Script Find Out In Which Directory Script File Resides"

Tweet this   Share on Facebook


Viewing all articles
Browse latest Browse all 2612

Trending Articles