-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 6 Jan 2003 22:20:58 +0800, Edward Dekkers wrote:
> How about a cute script? Run in the RPM directory of your RedHat CD: > > -- > > #!/bin/sh > # rpmgrind: (greps/finds things in rpms) > # usage: cd dir_w_rpms; rpmgrind word > > > word=$1 > > for rpm in *.rpm; do > rpm -qlp ${rpm} | grep -qs ${word} > if [ "$?" != 1 ]; then > echo ${rpm} > fi > done > > --- Here's one that works when the rpmdb-redhat package is installed: #! /bin/sh if [ $# -ne 1 ]; then echo -e "Usage: $0 <grep_pattern>" exit -1; fi RPMDB="--dbpath /usr/lib/rpmdb/i386-redhat-linux/redhat" SPINNER=("\\" "|" "/" "-") C=0 for i in `rpm -qa $RPMDB`; do rpm -ql $i $RPMDB | grep $1 >/dev/null && echo $i echo -en "${SPINNER[$C]}" echo -en "\b" # C=$(echo "scale=0; ($C+1)%4" | bc -l) C=$[($C+1)%4] done -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+GdFf0iMVcrivHFQRAoC3AKCEIJP4bUAEFke9hETkS33rXv7fPwCdE1gl JYwE9ECrU9kME8JZcULrgLU= =hUrT -----END PGP SIGNATURE----- -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list