[TriLUG] Printing all RPMs by group

Tom Bryan tbryan at python.net
Tue Jan 1 04:38:53 EST 2002


During an upgrade to Red Hat 7.2, I find that I have run out of space on 
/usr/ to install some of the packages that I want.  In an attempt to start 
cleaning up my system (to get a higher ratio of used/unused programs on my 
system), I wanted to print all of the RPMs on my system, grouped by RPM 
group.  For those interested, here's what I did:

for x in `cat /usr/share/doc/rpm-4.0.3/GROUPS`
do  
	echo $x 
	rpm -q -g $x
	printf "\n" 
done > rpms.txt

enscript --landscape --columns=4 --truncate-lines --output=rpms.ps rpms.txt

lpr rpms.ps

So, I have two reasons for sending this message.  I thought that I'd start 
your New Year with a handy script, and I wanted to ask if there is a more 
standard way of doing this.

---Tom



More information about the TriLUG mailing list