perl -e '@arr=`rpm -qa`; if (grep /^cups-\d/, @arr) {print grep /^cups-\d/, @arr} elsif (grep /^cups-/, @arr) {print "Empty set\n"}'