All pastes #760463 Raw Edit

Stuff

public text v1 · immutable
·published 2007-11-04 00:59 UTC
rendered paste body
cd /media/cdrom/CentOS/RPMS/
for i in `ls`; do
   rpm --nosignature --nodeps -qpV $i
   result=$?
   missing=`rpm --nosignature --nodeps -qpV $i | grep -v missing | wc -l`
   if [ "$result" != "0" ]; then
      if [ "$missing" == "0" ]; then
         rpm -e --nodeps --nosignature --justdb `rpm -qp --nosignature --nodeps $i` 2>/dev/null;
      else
         echo "Check $i";
      fi
   fi;
done;