LinuxQuestions.org
Visit Jeremy's Blog.
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, 06: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, 06:49 AM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,899

Rep: Reputation: 68
Do you want to filter something like rpm -qia ??
 
Old 06-27-2006, 07: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, 07:21 AM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
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, 10: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, 03:37 PM   #6
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 805

Rep: Reputation: 186Reputation: 186
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


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


All times are GMT -5. The time now is 12:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration