Shell Scripting – How to Detect the Current Directory

shell

How may I detect the name of the directory (or better yet the entire path) in which my shell script is run?

Best Answer

what shell? What operating system?

For starters try

man pwd
$PWD
Related Question