#!/bin/bash CARD="/mnt/card" LINKS="/opt/QtPalmtop/apps/Applications /opt/QtPalmtop/apps/Jeode /opt/QtPalmtop/apps/Games /opt/QtPalmtop/demo /opt/QtPalmtop/bin /opt/QtPalmtop/pics /opt/QtPalmtop/share /opt/QtPalmtop/lib /opt/QtPalmtop/lib/fonts /etc" for i in $LINKS; do dir="$CARD$i" echo "$dir" cd $dir for j in *; do echo -n -e " $i/$j: " if [ ! -e $i/$j ] then echo -n " doesn't exist!" fi if [ -L $i/$j ] then echo -n "removing link" rm -f $i/$j fi echo done done