for i in *.rpm do if [ -f ../../SL/$i ] ; then echo "Already have $i in SL/, moving it." echo $i >> moved.log mv $i ../../SL/ fi echo "" done