#!/bin/sh if [ $# -eq 0 ]; then paths="." else paths="$*" fi for p in $paths; do for l in `find $p -type l`; do if [ ! -r $l ]; then echo "$l" fi done done