QShell command `readlink' outputs the value of the given symbolic link. If `readlink' is invoked with an argument other than the name of a symbolic link, it produces no output and exits with a nonzero exit code.
The following examples illustrate possible usage of QShell command `readlink'.
> ln -s log link-to-log $ > readlink link-to-log # print the referent of a symbolic link log $ > REF=$(readlink link-to-log) # read the referent of a *SYMLNK into a variable $ > echo $REF log $
By using PASE shell command qsh, qsh_inout, or qsh_out you may utilize `readlink' from PASE shell environment. To start a new interactive PASE shell session you should call program QP2TERM. To invoke a PASE program within an interactive job or a batch job you may call program QP2SHELL or QP2SHELL2 and pass necessary PASE program name and parameters.
Utilize `readlink' in a PASE shell environment
Start an interactive PASE shell session by calling program QP2TERM. Type the following PASE shell command and the you may get the following output.
> qsh -c "readlink link-to-log"
log
$