- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- here-document <<EOF
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
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
07-24-2000 08:29 AM
07-24-2000 08:29 AM
This script works on HP-UX11 and Oracle 8.0.5
It does NOT work on HP-UX 10.20 and Oracle 7.3.4
--------------------------
script:
set -x
typeset x
x=`svrmgrl <
connect internal
alter system archive log current;
EOF`
echo $x
--------------
output (of set -x):
+ typeset x
+ + svrmgrl
+ 0< /tmp/sh14826.8 2>& 1
--------------
When I run it in a subshell, it looks like this:
+ typeset x
+ + svrmgrl
+ 0< /tmp/sh15224.7 2>& 1
Bus error(coredump)
$
--------------
When executing this script under other conditions, I have seen the Oracle errors:
MGR-11401: input error, unable to read input line
MGR-01508: unable to close the current file
============================================
# contents of /tmp (relevant part) after (the first version of) the event above
----------------------------------
-rw-r--r-- 1 oracle dba 408 Jul 24 15:40 sh14826.1
-rw-r--r-- 1 oracle dba 479 Jul 24 15:40 sh14826.2
-rw-r--r-- 1 oracle dba 273 Jul 24 15:40 sh14826.3
-rw-r--r-- 1 oracle dba 408 Jul 24 15:40 sh14826.4
-rw-r--r-- 1 oracle dba 273 Jul 24 15:40 sh14826.6
-rw-r--r-- 1 oracle dba 479 Jul 24 15:40 sh14826.5
-rw-r--r-- 1 oracle dba 51 Jul 24 15:40 sh14826.7
# the contents of the last file looks like that is the one that should have been used, but above it seems to try to use sh14826.8
---------------------------------------------
Gt $ more /tmp/sh14826.7
connect internal
alter system archive log current;
Can anybody give me some idea of what is going wrong?
Many thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2000 08:45 AM
07-24-2000 08:45 AM
Re: here-document <<EOF
This could well be a patchlevel problem.
What shell do you use? Do you have the same problem with sh and ksh?
There have been some problems with the HP-UX shells that could explain you behaviour, but I need more details.
If you are using the posix shell, following link might be interesting:
http://europe-support2.external.hp.com/cki/bin/doc.pl/sid=70d3ca160a8cb138bc/screen=ckiDisplayDocument?docId=200000048685504
Bye,
Rik
Bye,
Rik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2000 09:19 AM
07-24-2000 09:19 AM
Solutionsvrmgrl <
startup
EOF
I capture the output by having this script called by a wrapping script and redirecting stout and sterr to a logfile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2000 09:46 AM
07-24-2000 09:46 AM
Re: here-document <<EOF
svrmgrl <
EOF
x=$?
echo $x
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2000 12:06 AM
07-26-2000 12:06 AM
Re: here-document <<EOF
should work just fine. The here document is only meaningful if you really have a long text.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2000 03:00 AM
07-27-2000 03:00 AM
Re: here-document <<EOF
should work just fine. The here document is only meaningful if you really have a long text.
in the above string "connect internal" should have been followed by 'backslash'-'n' instead of just 'n'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2000 03:02 AM
07-27-2000 03:02 AM
Re: here-document <<EOF
should work just fine. The here document is only meaningful if you really have a long text.
(last try to make 'backslash' visible)