Current Working Directory

$PWD contains the absolute pathname of the current working directory.

The pwd command is helpful to work with the working directory.

Live Templates

The dir_posix and dir_bash live template insert a command to retrieve the full to the directory, where the current script is located:

1
2
# Live template dir_posix inserts this:
DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)"
BashSupport Pro is a Bash IDE with support for $PWD – try it now!
© 2020–2022 Joachim Ansorg
Imprint
Privacy Policy
Legal