LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Hi plz help me in writing scripts (https://www.linuxquestions.org/questions/linux-newbie-8/hi-plz-help-me-in-writing-scripts-458700/)

rammu_sivraj 06-27-2006 05:33 AM

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

raskin 06-27-2006 05:49 AM

Do you want to filter something like rpm -qia ??

rammu_sivraj 06-27-2006 06:14 AM

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

raskin 06-27-2006 06:21 AM

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

reshojaei 06-27-2006 09:35 AM

I think with this you can get something near what you want
rpm -qia | grep Name | more

AnanthaP 06-27-2006 02:37 PM

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


All times are GMT -5. The time now is 01:03 PM.