Bash & Linux Command Guide
posts
/
Search
All tags
Posts tagged with "dirname"
Making Portable Scripts: How to Reliably Find Your Script's Own Directory
Learn the definitive, foolproof method to locate a Bash script's own directory using BASH_SOURCE and `dirname`. Make your scripts portable and reliable, no matter where they are run from.