LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

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


Hi..
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
Rammu
 
Old 06-27-2006, 05:49 AM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Do you want to filter something like rpm -qia ??
 
Old 06-27-2006, 06:14 AM   #3
rammu_sivraj
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
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
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
reshojaei
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
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
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.

End
 
  


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
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:37 PM.

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