#!/bin/bash check_symlinks() { for file in `find ${1} -type l` ; do if ! test -e ${file} ; then echo "Broken symlink:" echo "${file}" fi done } NBDIR="/usr/share/netbeans-5.0" check_symlinks ${NBDIR}/platform6/modules/ext ${NBDIR}/bin/netbeans