LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-28-2004, 02:10 PM   #1
jimwelc
Member
 
Registered: Nov 2004
Location: Boston
Posts: 30

Rep: Reputation: 15
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
 
Old 12-28-2004, 02:37 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Use it like this where firefox can be whatever rpm you are looking for.
rpm -qa | grep firefox
 
Old 12-28-2004, 02:41 PM   #3
laceupboots
Member
 
Registered: Dec 2003
Location: Houston
Distribution: Knoppix,lenova yoga 3, Samsung s6 -android
Posts: 307

Rep: Reputation: 30
Try the command urpmi -q it will check to see if the package is installed on your system.
 
Old 12-28-2004, 03:01 PM   #4
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
An RPM Script to break my system! haitham Linux - Certification 45 03-28-2006 08:57 AM
make a bash script accesible from anywhere in the system osio Programming 9 09-20-2005 02:33 PM
Bash scripting and trying to determine whether a directory exists? obelxi Programming 9 04-18-2005 11:22 PM
where does 'su' look to determine if a user exists? MisterESauce Linux - Software 5 04-13-2005 09:18 AM
Compare installed RPM versions using Bash script jimwelc Linux - Newbie 6 01-28-2005 10:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration