Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-27-2006, 05:33 AM   #1
LQ Newbie
Registered: May 2006
Posts: 15

Rep: Reputation: 0
Hi plz help me in writing scripts

I'm using redhat 2.4.20
I'm trying to write a shell script to display the file system packages and software packages of my system
For that i used the command,
rpm -qa | more ( to display system packages)
but the output is not so clean.. i need an exact system packages instead of a vague one.. plz help me
Old 06-27-2006, 05:49 AM   #2
Senior Member
Registered: Sep 2005
Location: Russia
Distribution: NixOS (
Posts: 1,899

Rep: Reputation: 68
Do you want to filter something like rpm -qia ??
Old 06-27-2006, 06:14 AM   #3
LQ Newbie
Registered: May 2006
Posts: 15

Original Poster
Rep: Reputation: 0
s i've to filter out to view only the packages installed in the system.. not other stuffs..
the output of my command should be a clear one
plz help me
Thanks in advance
Old 06-27-2006, 06:21 AM   #4
Senior Member
Registered: Sep 2005
Location: Russia
Distribution: NixOS (
Posts: 1,899

Rep: Reputation: 68
Sorry, I thought yum gives random garbage, and rpm only installed packages. If in RH it is no more the case, then sorry. Maybe you can still filter rpm -qia by something like "grep Status: installed" -B2 , but I don't know exactly (for reasons mentioned under my name on the left..)..
Old 06-27-2006, 09:35 AM   #5
LQ Newbie
Registered: Oct 2005
Location: toronto
Posts: 8

Rep: Reputation: 0
I think with this you can get something near what you want
rpm -qia | grep Name | more
Old 06-27-2006, 02:37 PM   #6
Registered: Jul 2004
Location: Chennai, India
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 820

Rep: Reputation: 197Reputation: 197
What do you mean "output is not clean"? Please elaborate. If you want a more formatted output, you will have to pipe the output to an appropriate program.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Writing Scripts for Linux in Windows AxXium Linux - General 4 07-18-2005 04:01 PM
best way to have a startup scripts for games. plz help sendas4 Linux - General 2 09-07-2004 05:29 PM
Help needed in writing Awk Scripts.. TheDarktrooper Red Hat 1 05-04-2004 06:49 PM
Writing C++ Shell Scripts MasterKin8T Programming 5 09-29-2003 10:43 AM
Writing scripts Rameriez Programming 2 01-07-2003 12:01 AM

All times are GMT -5. The time now is 08:27 AM.

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