LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Query multiple packages (https://www.linuxquestions.org/questions/linux-newbie-8/query-multiple-packages-631333/)

john_h_grubb 03-28-2008 03:13 PM

Query multiple packages
 
Hello all,

I remember querying multiple rpms once using rpm -qa | grep -i <package>, <package> but it is not working for me now. Am I doing something wrong here?

Does anyone know how I can search for a let say... 10 packages in one search string?

Thanks,

prad77 03-28-2008 04:04 PM

egrep -i "str1|str2"

or

grep -i -e pattern1 -e pattern2

Gentoo

simplicissimus 03-29-2008 04:44 AM

comma
 
Code:

rpm -qa | grep -i <package>, <package>
I would omit the comma between the package names: 'rpm' will consider the comma being part of the package name or (when surrounded by spaces) think it is a package name.

Hope this helps,
Regards
SIMP

Fedora User


All times are GMT -5. The time now is 05:35 AM.