How to obtain Hardware/Software information

Christopher Browne cbbrowne-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Jul 12 19:16:58 UTC 2006


On 7/12/06, Paul Apking <papking-SHEVDZ1kpJ4gvB26Rb+75tBPR1lH4CV8 at public.gmane.org> wrote:
> Is there anymore of a user friendly output from another command?

No, doing what you need to with this sort of information is considered
to be a SMOP (Simple Matter Of Programming).  After all, the fields
are all nicely colon delimited so that it's quite trivial to grep/cut
the parts that you might need.

There wind up being two choices, at this point:

1.  You may behave as a completely helpless user that can only
function if you're provided with a report in the exact form you
require, or

2.  It doesn't take a terribly high level of "ability for self-help"
to write a script that extracts the data you require and format them
in any arbitrary form that may be desired.

Seneca's suggestions seem pretty sound to me; I would add two commands to hers:
a) If on an RPM-based system, the command "rpm -qa" will list all
packages installed
b) If on a deb-based system, the command "dpkg -l" will list all
packages installed

You may need to get more detailed information; again, using a script
on those package lists, combined with rpm/dpkg runs with extra options
as may be determined from their respective manual pages, would be what
is needed.

It is common for SMOP to be used in an ironic fashion, where the one
using the term believes that the Matter Of Programming is likely to be
anything BUT simple; that's not my intent here...
-- 
http://www3.sympatico.ca/cbbrowne/linux.html
Oddly enough, this is completely standard behaviour for shells. This
is a roundabout way of saying `don't use combined chains of `&&'s and
`||'s unless you think Gödel's theorem is for sissies'.
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list