$ mkdir tmp1 ; ln -s tmp1 tmp2
$ ( cd tmp2 ; pwd )
/home/user/git/install/src/tmp2
$ ( cd tmp2 ; /usr/bin/pwd )
/home/user/git/install/src/tmp1
Apparently bash assumes the "-L" option by default, and coreutils assumes the "-P" option by default. So depending on whether you're running pwd from bash or shelling out to /usr/bin/pwd, you may get different results.
Comments URL: https://news.ycombinator.com/item?id=19326224
Points: 2
# Comments: 1
from Hacker News: Newest https://ift.tt/2SJSlW0
via IFTTT
No comments:
Post a Comment