[plug] re: awk

Lawrie Abbott lawrieabbott at iinet.net.au
Sun Jul 20 22:19:27 WST 2003


Jon Miller wrote:
> I seemed to recall that there is a way to get a listing of files (in
> this case rpms) where one could use (correct me if I'm wrong) awk to
> limit the output to either the filename only or filename and version
> only.  However I've looked at man awk and awk --help, and I just do not
> understand how it is used.  I would appreciate it if someone could send
> an example with a simple explanation.
> 
> Thanks
> 
> 
These any use?

#rpm list

rpm -qa --info| grep Name | awk '{print $3}'| sort


#list package names containing 'python' (with  check for : in second column)

rpm -qa --info| grep Name | awk '$2==":" {print $3}' | grep -i python

python-devel
python2
libsndfile-python
python-clap
python2-tools
python2-tkinter
pythonlib
python
python2-devel
python-popt
rpm-python
wxPythonGTK-devel
python-xmlrpc
wxPythonGTK-py2.2



--
Lawrie Abbott




More information about the plug mailing list