Checking Dead Links

I am writing a shell script (bash) for system administration.Now in that script, I want to check whether a perticular soft
link on the system is dead or alive.

I want something like this,

if [ alive ]
then
......
else
......
fi

>>>>>>>>

I just tested it and dead symlinks fail "if [ -e file ]" but pass "if [ -h file ]".

>>>>>>>>

[ -e file ] worked.

Have a Linux Problem
Linux Forum - Do you have a Linux Question?

Linux Books
Linux Certification, System Administration, Programming, Networking Books

Linux Home: Linux System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.