FROM=/mnt/src/scientific/30rolling/x86_64/SL/RPMS/ TO=/mnt/src/scientific/30rolling/i386/SL/RPMS/ TO2=/mnt/src/scientific/30rolling/i386/notsupported/RPMS/ TO3=/mnt/src/scientific/30rolling/i386/errata/debuginfo/RPMS/ cd $FROM for i in *.rpm do name=`rpm -qp --queryformat "%{NAME}-%{VERSION}-%{RELEASE}.%{arch}.rpm" $i` if [ $name = $i ] ; then echo "$name is the SAME as $i" else echo "$name is not the same as $i" fi done