home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / rescue / usr / bin / rpmlocate < prev    next >
Text File  |  2006-11-29  |  336b  |  13 lines

  1. #!/bin/sh
  2. #
  3. # Copyright (c) 1999 SuSE Linux AG, Nuernberg, Germany. All rights reserved.
  4. #
  5.  
  6. for i in $* ; do
  7.     echo Searching for "$i" in rpm db...
  8.     rpm -qal --qf "%{NAME}-%{VERSION}-%{RELEASE}:\n" | \
  9.         grep "\(^[^/]\)\|\($i\)" | \
  10.         awk '/^[^/]/ { pkg=$0; next } { if ( pkg ) { print "\n"pkg; pkg="" } print }'
  11. done
  12.  
  13.