Determine the path of the executing BASH script

Posted by Atif Aziz on Stack Overflow See other posts from Stack Overflow or by Atif Aziz
Published on 2009-03-10T14:10:22Z Indexed on 2010/05/03 12:28 UTC
Read the original article Hit count: 235

Filed under:

In a Windows command script, one can determine the directory path of the currently executing script using %~dp0. For example:

@echo Running from %~dp0

What would be the equivalent in a BASH script?

© Stack Overflow or respective owner

Related posts about bash