LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Does anyone know of a bash script that will determine if RPM exists on a system? (https://www.linuxquestions.org/questions/linux-software-2/does-anyone-know-of-a-bash-script-that-will-determine-if-rpm-exists-on-a-system-271231/)

jimwelc 12-28-2004 02:10 PM

Does anyone know of a bash script that will determine if RPM exists on a system?
 
Hello,

I am very new to bash scripting along with Linux platform and was wondering if anyone knew of a way to check for the existence of RPM on a system. Currrently I would like my script to check for the existence of RPM before performing some action. If any one could help me I would really appreciate it.

Best Regards,
-Jim

homey 12-28-2004 02:37 PM

Use it like this where firefox can be whatever rpm you are looking for.
rpm -qa | grep firefox

laceupboots 12-28-2004 02:41 PM

Try the command urpmi -q it will check to see if the package is installed on your system.

homey 12-28-2004 03:01 PM

Quote:

Try the command urpmi -q it will check to see if the package is installed on your system.
That's a Mandrake thingy. :)


All times are GMT -5. The time now is 06:09 PM.