- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- [ How to reduce the time of getting information of...
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
11-11-2004 11:58 PM
11-11-2004 11:58 PM
We are required to retrive the information of around 15 product from the HPUX. And we requie only location, size, tag and version (revision) information for all 15 products. I am running a script but it takes lot of time to get all these information. In script i am using this logic. It reads name of the products from a file, and runs repeated swlist command with
infile=$1
REQUIRED_TAGS="size revision location tag"
for line in `cat $infile`
do
for tags in $REQUIRED_TAGS
do
swlist -vl product $line | grep -w ^$tags
done
done
tag :- contains all the required fields.
line:- contains all the product name.
Is there any way to reduce the time.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2004 12:53 AM
11-12-2004 12:53 AM
Re: [ How to reduce the time of getting information of depots ]
run the command onto a file swlist -vl product > swlist.out
then run the grep command against the file
so the command is not run aagain and again
Regards
jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2004 01:20 AM
11-12-2004 01:20 AM
SolutionAs in:
swlist -a size -a revision -a location -a tag `cat $infile`
Or, of course:
swlist -a size -a revision -a location -a tag | grep -f $infile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2004 03:00 AM
11-12-2004 03:00 AM
Re: [ How to reduce the time of getting information of depots ]
swlist -f fileWithProducts
Then, as others have said, specify the attributes you want directly on the command line:
swlist -a size -a revision ... -f fileWithProducts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2004 08:37 PM
11-12-2004 08:37 PM