READLINKP(1)                General Commands Manual               READLINKP(1)



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

SYNOPSIS
       readlinkp [-hHVQf] target_path

TL;DR
       #!/bin/sh
       full=`readlinkp "$0"`
       echo "${full%?}"

       ~$ sh mysrc.sh #>> /home/abc/mysrc.sh
       ~$ mysrc (link)     #>> /home/abc/mysrc.sh


OPTIONS
       -hHV   usage, version

       -f     this option is ignored. this command always resolves links.

       -Q     output corecode

DESCRIPTION
       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.

EXIT_STATUS
       suc/fail == 0/not0

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

CONFORMING_TO
       posix-shell

COPYRIGHT
       Copyright (C) 2021 Momi-g
       License GPLv3+ <https://gnu.org/licenses/gpl.html>

VERSION
       2021-09-11 v2.0.0

SEE_ALSO
       readlink(1)



                                                                  READLINKP(1)
