Software Distributor Administration Guide HP-UX 11i v1, 11i v2, and 11i v3 (5900-2561, March 2013)

3.1.4.1 Using Options to Change List Appearance
You can control the appearance and content of your lists by changing list default values in the
options files. Instead of repeatedly specifying the software levels and attributes each time you
invoke swlist, you can use:
level This option pre-determines what level to list: product,
subproduct, fileset or file. For example, by setting this default
to level=fileset, future swlist commands would
always list everything down to and including filesets for
each host, depot or product selected.
one_liner="attribute
attribute attribute"
This option specifies the attributes (revision, size, title, etc.)
displayed as the default listing. These attributes are
separated by <tab> or <space> and enclosed in quotes
(" "). You can choose multiple attributes but not all attribute
may exist for all applicable software levels (product,
subproduct, or fileset). For example, the software attribute
title is available for bundles, products, subproducts and
filesets, but the attribute architecture is only available
for products.
In the absence of the -v or -a option in your command, swlist displays the information as
described in the one_liner default for each software object level (bundle, products, subproducts
and filesets), not for files.
3.1.4.2 Listing Attributes
You may specify only one attribute per -a option. However, the tag attribute is always included
by default, so specifying -a revision lists all product names and their revision numbers.
For example, to list whether software bundles on a CD-ROM (mounted to the directory /SD_CDROM)
require a codeword or not, use the command: swlist -d -a is_protected @ /SD_CDROM
An attribute containing a large amount of information (for example, a README) is physically stored
as a separate file and is displayed by itself if -a README is requested.
Refer to the sd(4) manpage for a full list of SD-UX attributes.
3.1.4.3 Creating Custom Lists
The swlist options and defaults allow you to create lists to fit your specific requirements. These
lists can be as simple as listing the software products installed on your local host or as complex
as a multiple column listing of files, filesets, subproducts, products and bundles installed.
For example, if you were to change the one-liner option on the command line, the command:
swlist -x one_liner="name revision size title"
produces this list of all the products installed on the local host:
RX 1.98 9845 RX X Terminal - all software
ALLBASE 8.00.1 6745 Database Products
C-LANG 2.5 5678 Programming Language
DIAGNOSTICS 2.00 56870 Hardware Diagnostic Programs
DTP68 2.00 26775 Desktop Publishing
LISP-LANG 8.00.1 90786 LISP Programming Language
WINDOWS 2.06 10423 Windowing Products
This listing shows, in columns from left to right, the product’s tag, its revision number, its size in
Kbytes and its title or full name.
NOTE: Whatever you specify in the command line for software level and attributes will override
the values in the default option files.
3.1 Listing Your Software (swlist) 69