3 ms·
> You don't need realpath Yes you do (or a suitable alternative, e.g. GNU readlink). > The `cd` into the directory + `pwd` is equivalent. You won't know whic
by account42 3y ago
> You don't need realpath
Yes you do (or a suitable alternative, e.g. GNU readlink).
> The `cd` into the directory + `pwd` is equivalent.
You won't know which directory to cd to without realpath. Just stripping off the filename does not get you the correct directory if the file itself is a symlink, which is a common use case.
- js2 3y agoDoh, you're right. Thank you for the correction.