#!/bin/sh rpm -qa | grep ^lib| sed s'/-[0-9].*$//'| while read pkg; do # echo $pkg mbdead=`rpm -q --whatrequires $pkg 2>&1 | grep предупреждение| cut -s -d' ' -f 8` if [ -n $mbdead ]; then if rpm -e --test $mbdead > /dev/null 2>&1; then echo $mbdead": is not required for any package"; fi; fi; done