Martin Pool writes:

> I am not sure what a good portable way to test for symlinks from the
> shell would be.

In libtool we've used

if (test -h $file) >/dev/null 2>&1 || (test -L $file) >/dev/null 2>&1 ; then
    echo "$file is a symlink"
fi

(Actually, it's part of a larger scheme to replace 'test -e', but this
part covers the symlink case.)

-- 
Peter Eisentraut   [EMAIL PROTECTED]


Reply via email to