I'm thinking no

I am also thinking no. Once you have performed your cd into sym1 the real directory you are in is dir1 so that's where the script thinks it is (and it's quite right to do so).

An obvious question is why you would want this? I see no benefit.


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

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