query formats with rpm
kurt.wall@timesys.com
kurt.wall
Mon May 17 11:28:36 PDT 2004
Typing furiously on March 17, Joel Hammer managed to emit:
> Could someone give me an example of using query formats with rpm?
> The man page says -qf followed by the format tag, like %{NAME} should do
> something useful, but I can't get it to work, at least on uninstalled
> packages.
> Thanks,
> Joel
The man page say "--qf", that is, 2 hyphens.
[kwall at krwtest]$ rpm -q glibc --qf %{NAME}
glibc
$ rpm -q glibc --qf "%{RPMVERSION} %{BASENAMES} %{NAME}"
4.0.3 ld.so.conf glibc[kwall at krwtest]$
[kwall at krwtest]$ rpm -q glibc --qf "RPM Version:\t%{RPMVERSION}\nName:\t%{NAME}\n"
RPM Version: 4.0.3
Name: glibc
Kurt
--
I know the answer! The answer lies within the heart of all mankind!
The answer is twelve? I think I'm in the wrong building.
-- Charles Schulz
More information about the Linux-users
mailing list