in reply to symbolic link and absolute path
You don't need readlink. Simply use abs_path.
$ cd /Users/nick $ echo 'hi' > /tmp/foo $ ln -s /tmp/foo ./foo $ perl -MCwd=abs_path -E 'say abs_path("./foo")' /private/tmp/foo $ perl -MCwd=abs_path -E 'say abs_path("/Users/nick/foo")' /private/tmp/foo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: symbolic link and absolute path
by joybee2015 (Novice) on Aug 09, 2017 at 05:26 UTC |