[plug] re: awk

Jon Miller jlmiller at mmtnetworks.com.au
Sun Jul 20 23:18:08 WST 2003


Exactly what I was looking for, thanks Lawrie.

Jon

On Sun, 2003-07-20 at 22:19, Lawrie Abbott wrote:
> 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
> 
-- 
Jon Miller <jlmiller at mmtnetworks.com.au>
MMT Networks Pty Ltd




More information about the plug mailing list