#!/bin/sh find "$@" -type l | while read line do if ! test -e "$line" then unlink "$line" fi done