Jacques B. wrote:
On Dec 22, 2007 8:33 AM, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote:
================================================
Not at my Linux box so can't validate this, but could you get it from
rpm -qa | grep {command_name}? Doesn't the rpm package name always
contain the version number? If so at least the format would be more
standardized thus easier to parse.
that would be rpm -qf $(type -L ls)
the type -P serves to cater the case you don't know where it is, but
fails of the command's not actually available (but a separate test can
handle that0.
Mapping that that returns to what's in your docs remains a challenge.
btw if this has to work on Debian too, dpkg --search is equivalent, but
the particulars are different.
--
Cheers
John
-- spambait
1aaaaaaa@xxxxxxxxxxxxxxxx Z1aaaaaaa@xxxxxxxxxxxxxxxx
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375
You cannot reply off-list:-)