dcsimg
 

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

Thursday Apr 29th 2021 by Roel Van de Paar

When you develop complex Bash scripts and start putting various scripts into a folder, paths become increasingly complex.

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. Here's how to find it.

Complete Story

Home
Mobile Site | Full Site