Peng Yu wrote:
> 'ls -l' shows the symbolic link and its target. I could parse the
> output. But I'm wondering whether there is a convenient command that
> only print the target if it is a symbolic link otherwise print
> nothing? Thank you for your help.
See the 'readlink' command.
info coreutils 'readlink invocation'
`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.
Also 'find' generally very useful for selecting files.
Bob