On 12 Mar 2001 kers@hplb.hpl.hp.com wrote:
> would
>
> ls -l the-linked-filename | sed -e 's/.*-> //'
>
> be any use?
I don't speak sed, but wouldn't that just check that it was a symbolic
link? If so, you can do that with the bash -L test
(as in `[ -L foo ] && echo foo is a symlink`).
I've gone for Stephen's idea:
ls -l /usr/X11R6/lib/libfoo.so | grep libfoo.so.6
since it checks the exact filename. Also, I haven't grepped for a
pathname because the link might be to ./libfoo.so.6 or something like
that.
- Andrew
|