Mailing the story:

How to Discover, From Inside a Bash Script, the Path the Script Is In

  • linuxconfig.org; By Roel Van de Paar (Posted by on CST)
  • Story Type: Tutorial; Groups: Linux
When you develop complex Bash scripts and start putting various scripts into a folder, where one script interacts with another by, for example, starting it, it quickly becomes necessary to ensure we know the path the script was started from, so we can start the other scripts with a fully qualified pathname.
What is your name?

What is your E-Mail address?

What is the email address of the recipient?

Add a special note from yourself?