READLINKP(1) General Commands Manual READLINKP(1)

readlinkp - return link resolved $0 + _ path. posix & portable.

readlinkp [-hHVQf] target_path

full=`readlinkp "$0"`
echo "${full%?}"
~$ sh #>> /home/abc/ ~$ mysrc (link) #>> /home/abc/

usage, version
this option is ignored. this command always resolves links.
output corecode

readlinkp is mimic of `readlink -f`, but this command always add `_` to the return path end.
skip symbolic link resolve if the path isnt exist.

suc/fail == 0/not0

this command doesnt work if `file -h` command output is quoted


Copyright (C) 2021 Momi-g
License GPLv3+ <>

2021-09-11 v2.0.0