It does. That's what $ENV{PWD} is. But to use that relies on the parent being process being bash, and it wouldn't be safe for a setuid script to use that.

Seeking work! You can reach me at ikegami@adaelis.com


In reply to Re^3: Getting the absolute path of a script, without PWD by ikegami
in thread Getting the shell's version of working directory, without PWD's help by perlancar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":