Support This Project Get i5/OS Programmer's Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads

QShell Command readlink

Go back to main page of i5/OS Programmer's Toolkit.

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

Remarks:
To start a new interactive QShell session you may use CL command QSH or STRQSH.
Start a new interactive QShell session and invoke `readlink' with a name of a symbolic link.

> 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
  $

Support This Project
Generated on Thu Oct 27 08:16:55 2011 for i5/OS Programmer's Toolkit: QShell Utilities by  doxygen 1.5.9