- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: swlist : version from gcc
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 06:07 PM
02-21-2006 06:07 PM
swlist : version from gcc
i had to install GCC , i want to know with
swlist command the version of GCC.
how can i find out the version ?
can i use swlist and "Software Selections"?
swlist :
gcc 4.0.2 gcc
swlist -v -l fileset gcc.gcc-RUN
# Initializing...
# Contacting target "backup4"...
#
# swlist Installed Software Table of Contents
#
# For host: backup4:/
#
# Date: Wed Feb 22 07:56:15 2006
#
gcc.gcc-RUN
fileset
tag gcc-RUN
software_spec gcc.gcc-RUN,l=/usr/local,r=4.0.2,a=HP-UX_B.11.23_64
data_model_revision 2.40
instance_id 1
.
.
man swlist
Software Selections
swlist supports the following syntax for each software_selection:
bundle[.product[.subproduct][.fileset]][,version]
product[.subproduct][.fileset][,version]
+ The = (equals) relational operator lets you specify
selections with the following shell wildcard and pattern-
matching notations:
[ ], *, ?
+ Bundles and subproducts are recursive. Bundles can contain
other bundles and subproducts can contain other subproducts.
+ The \* software specification selects all products. Use this
specification with caution.
The version component has the form:
[,r
[,c
[,fa
+ location applies only to installed software and refers to
software installed to a location other than the default
product directory.
+ fr and fa apply only to filesets.
+ The
=, ==, >=, <=, <, >, or !=
which performs individual comparisons on dot-separated
fields.
For example, r>=B.10.00 chooses all revisions greater than
or equal to B.10.00. The system compares each dot-separated
field to find matches.
+ The = (equals) relational operator lets you specify
selections with the shell wildcard and pattern-matching
notations:
[ ], *, ?, !
For example, the expression r=1[01].* returns any revision
in version 10 or version 11.
+ All version components are repeatable within a single
specification (e.g. r>=A.12, r
components.
+ Fully qualified software specs include the r=, a=, and v=
version components even if they contain empty strings. For
installed software, l= is also included.
+ No space or tab characters are allowed in a software
selection.
+ The software instance_id can take the place of the version
component. It has the form:
[instance_id]
within the context of an exported catalog, where instance_id
is an integer that distinguishes versions of products and
bundles with the same tag.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 06:13 PM
02-21-2006 06:13 PM
Re: swlist : version from gcc
You can use simply as, # swlist -l product gcc
It should provide you with all details.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 06:15 PM
02-21-2006 06:15 PM
Re: swlist : version from gcc
second field is version.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 06:17 PM
02-21-2006 06:17 PM
Re: swlist : version from gcc
# what `which gcc`
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 06:20 PM
02-21-2006 06:20 PM
Re: swlist : version from gcc
# what `which gcc` may not give you proper details if it is downloaded from other sites than HP. Better way is,
# swlist -l product gcc
# gcc -V
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 06:21 PM
02-21-2006 06:21 PM
Re: swlist : version from gcc
Use this command
#swlist | grep -i gcc
and for more information for swlist please go through this page.
http://docs.hp.com/en/B2355-90681/swlist.1M.html
Regards,
Asif Sharif
Asif Sharif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 07:03 PM
02-21-2006 07:03 PM
Re: swlist : version from gcc
thx for your answers ,
now i typed following command, to get the version, but can i get with one swlist command the version , only to use awk, etc ?
# software_spec gcc.gcc-RUN,l=/usr/local,r=4.0.2,a=HP-UX_B.11.23_64
swlist -a software_spec -v -l fileset gcc.gcc-RUN | \
awk '$1 ~ /^software_spec$/ {
pos_revision=match($0,",r=")+3
pos_hpux=match($0,",a=")
len=pos_hpux-pos_revision
print substr($0,pos_revision,len)
}'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 07:08 PM
02-21-2006 07:08 PM
Re: swlist : version from gcc
This should be suffient,
# swlist -l product gcc |awk '{print $2}'
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 07:19 PM
02-21-2006 07:19 PM
Re: swlist : version from gcc
# gcc -version
# gcc -V
will give the detials. or what `which gcc` for viewing.
Or with swlist as,
# swlist -l product gcc
To get the version then,
# swlist -l product gcc | awk '!/^#|^$/ { print $2; }'
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 09:00 PM
02-21-2006 09:00 PM