- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: scripting on HP-UX 11
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
Discussions
Discussions
Forums
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
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
тАО06-28-2001 04:20 AM
тАО06-28-2001 04:20 AM
scripting on HP-UX 11
HP-UX B.11.00 U 9000/800
Line:
(uncompress < ${LOCPATCHBIN}.Z ; echo $? > /tmp/err$$) | (cd $TEMPDIR; tar -xf - )
Even more:
While uncompress terminates normally if launched by hand, during the script it terminates with error code 141 (whose meaning I do not know).
Thank you for your help
Xavier Giannakopoulos
Tivoli Systems Inc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2001 04:31 AM
тАО06-28-2001 04:31 AM
Re: scripting on HP-UX 11
you should sepearte the lines and use set -x to help debug the script but it is possible that LOCPATCHBIN refers to the software distributor directory that changed from 10.20 to 11.00
/var/adm/sw on the two OSes is structured differently.
You may want to look into that.
For error numbers look for errno.h
and/or the return codes of the application from the RETURNS section of the man for each command.. when you find out from the debug set -x which one has failed.
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2001 05:20 AM
тАО07-02-2001 05:20 AM
Re: scripting on HP-UX 11
I did the set -x.
LOCPATCHBIN is computed by the script, and is right.
About the return code, I did not find any mention of code 141 neither in errno.h and various subincludes, nor in compress manpage. Maybe I have to download the source code for compress...
And finally I am sure that uncompress is failing because the output says so, and the script is making the difference between the two parts of the command.
I wanted to know if there is a reason why the same line in a script would fail if using a pipe, but success if using a temporary file.
Thanks again, Xavier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2001 06:23 AM
тАО07-02-2001 06:23 AM
Re: scripting on HP-UX 11
Have you tried the following ?
zcat ${LOCPATCHBIN}.Z |(cd $TEMPDIR; tar -xf -)
I've tried this on 11.0 and it works
Regards,
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2001 08:12 AM
тАО07-02-2001 08:12 AM
Re: scripting on HP-UX 11
+ zcat /var/xxxxxx.tar.Z
+ cd /var/xxxxxxxx.8971
+ tar -xf -
+ tar_ret=0
+ + cat /tmp/err8971
+ echo 141
+ 1> /tmp/err8971
uncompress_ret=141
+ rm -f /tmp/err8971
+ [ 141 -ne 0 ]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2001 01:47 AM
тАО07-03-2001 01:47 AM
Re: scripting on HP-UX 11
The error coed 141 appears, because the uncompress was terminated after receiving signal 13 (128+13==141) SIGPIPE.
That happens, if the process after the pipe closes its STDIN before uncompress is finished.
Maybe tar doesn't do what you want?