try this next time

On Thu, 9 Mar 2000, Gustav Schaffter wrote:
> 
> My situation was different in that I was trying to search the RH CD in
> the RPMS directory to find which .rpm would install the file for me.
> 
> I have now found it, by some smart(? :-) guess work, and installed it.
> But I'm still unclear how I would search all the .rpm files in the RPMS
> directory on the CD to find what package would install a specific file
> for me.
> 
> Regards
> Gustav

#!/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




-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to