<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: here-document &amp;lt;&amp;lt;EOF in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432396#M3592</link>
    <description>echo "connect internalnalter system archive log current;" | svrmgrl &lt;BR /&gt;&lt;BR /&gt;should work just fine. The here document is only meaningful if you really have a long text. &lt;BR /&gt;&lt;BR /&gt;in the above string "connect internal" should have been followed by 'backslash'-'n' instead of just 'n'.</description>
    <pubDate>Thu, 27 Jul 2000 10:00:36 GMT</pubDate>
    <dc:creator>Dragan Krnic</dc:creator>
    <dc:date>2000-07-27T10:00:36Z</dc:date>
    <item>
      <title>here-document &lt;&lt;EOF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432391#M3587</link>
      <description>I am struggling with a script that uses a here-document. &lt;BR /&gt;&lt;BR /&gt;This script works on HP-UX11 and Oracle 8.0.5&lt;BR /&gt;&lt;BR /&gt;It does NOT work on HP-UX 10.20 and Oracle 7.3.4&lt;BR /&gt;&lt;BR /&gt;--------------------------&lt;BR /&gt;script:&lt;BR /&gt;set -x&lt;BR /&gt;typeset x&lt;BR /&gt;x=`svrmgrl &amp;lt;&lt;EOF 2=""&gt;&amp;amp;1&lt;BR /&gt;connect internal&lt;BR /&gt;alter system archive log current;&lt;BR /&gt;EOF`&lt;BR /&gt;echo $x&lt;BR /&gt;&lt;BR /&gt;--------------&lt;BR /&gt;output (of set -x):&lt;BR /&gt;+ typeset x&lt;BR /&gt;+ + svrmgrl&lt;BR /&gt;+ 0&amp;lt; /tmp/sh14826.8 2&amp;gt;&amp;amp; 1&lt;BR /&gt;&lt;BR /&gt;&lt;YOUR&gt;&lt;BR /&gt;&lt;BR /&gt;--------------&lt;BR /&gt;When I run it in a subshell, it looks like this:&lt;BR /&gt;+ typeset x&lt;BR /&gt;+ + svrmgrl&lt;BR /&gt;+ 0&amp;lt; /tmp/sh15224.7 2&amp;gt;&amp;amp; 1&lt;BR /&gt;Bus error(coredump)&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;--------------&lt;BR /&gt;When executing this script under other conditions, I have seen the Oracle errors:&lt;BR /&gt;MGR-11401: input error, unable to read input line&lt;BR /&gt;MGR-01508: unable to close the current file&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;============================================&lt;BR /&gt;&lt;BR /&gt;# contents of /tmp (relevant part) after (the first version of) the event above&lt;BR /&gt;----------------------------------&lt;BR /&gt;-rw-r--r--   1 oracle     dba            408 Jul 24 15:40 sh14826.1&lt;BR /&gt;-rw-r--r--   1 oracle     dba            479 Jul 24 15:40 sh14826.2&lt;BR /&gt;-rw-r--r--   1 oracle     dba            273 Jul 24 15:40 sh14826.3&lt;BR /&gt;-rw-r--r--   1 oracle     dba            408 Jul 24 15:40 sh14826.4&lt;BR /&gt;-rw-r--r--   1 oracle     dba            273 Jul 24 15:40 sh14826.6&lt;BR /&gt;-rw-r--r--   1 oracle     dba            479 Jul 24 15:40 sh14826.5&lt;BR /&gt;-rw-r--r--   1 oracle     dba             51 Jul 24 15:40 sh14826.7&lt;BR /&gt;&lt;BR /&gt;# 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&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;Gt $ more /tmp/sh14826.7&lt;BR /&gt;connect internal&lt;BR /&gt;alter system archive log current;&lt;BR /&gt;&lt;BR /&gt;Can anybody give me some idea of what is going wrong? &lt;BR /&gt;&lt;BR /&gt;Many thanks&lt;/YOUR&gt;&lt;/EOF&gt;</description>
      <pubDate>Mon, 24 Jul 2000 15:29:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432391#M3587</guid>
      <dc:creator>Geetam</dc:creator>
      <dc:date>2000-07-24T15:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: here-document &lt;&lt;EOF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432392#M3588</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;This could well be a patchlevel problem.&lt;BR /&gt;&lt;BR /&gt;What shell do you use? Do you have the same problem with sh and ksh?&lt;BR /&gt;&lt;BR /&gt;There have been some problems with the HP-UX shells that could explain you behaviour, but I need more details.&lt;BR /&gt;&lt;BR /&gt;If you are using the posix shell, following link might be interesting:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://europe-support2.external.hp.com/cki/bin/doc.pl/sid=70d3ca160a8cb138bc/screen=ckiDisplayDocument?docId=200000048685504" target="_blank"&gt;http://europe-support2.external.hp.com/cki/bin/doc.pl/sid=70d3ca160a8cb138bc/screen=ckiDisplayDocument?docId=200000048685504&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Bye,&lt;BR /&gt;Rik&lt;BR /&gt;&lt;BR /&gt;Bye,&lt;BR /&gt;Rik&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Jul 2000 15:45:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432392#M3588</guid>
      <dc:creator>RikTytgat</dc:creator>
      <dc:date>2000-07-24T15:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: here-document &lt;&lt;EOF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432393#M3589</link>
      <description>It looks to me like you are running into problems wth the input stream redirection interfering with your remote session.  I believe this is a side effect of your saving the output of the executed svrmgrl command in a variable (causing a temporary file to be sourced, rather than maintaining the here document).  I have had no trouble with the simple form:&lt;BR /&gt;&lt;BR /&gt;svrmgrl &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;connect internal&lt;BR /&gt;startup&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;I capture the output by having this script called by a wrapping script and redirecting stout and sterr to a logfile.</description>
      <pubDate>Mon, 24 Jul 2000 16:19:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432393#M3589</guid>
      <dc:creator>Alan Riggs</dc:creator>
      <dc:date>2000-07-24T16:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: here-document &lt;&lt;EOF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432394#M3590</link>
      <description>Geetam, Alan is right - in addition if you want to check for the return status of the svrmgrl command, you can say:&lt;BR /&gt;&lt;BR /&gt;svrmgrl &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;connect internal &lt;BR /&gt;&lt;WHATEVER you="" want="" in="" here=""&gt;&lt;BR /&gt;EOF&lt;BR /&gt; &lt;BR /&gt;x=$?&lt;BR /&gt;echo $x&lt;/WHATEVER&gt;</description>
      <pubDate>Mon, 24 Jul 2000 16:46:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432394#M3590</guid>
      <dc:creator>Kofi ARTHIABAH</dc:creator>
      <dc:date>2000-07-24T16:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: here-document &lt;&lt;EOF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432395#M3591</link>
      <description>echo "connect internalnalter system archive log current;" | svrmgrl&lt;BR /&gt;&lt;BR /&gt;should work just fine. The here document is only meaningful if you really have a long text.</description>
      <pubDate>Wed, 26 Jul 2000 07:06:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432395#M3591</guid>
      <dc:creator>Dragan Krnic</dc:creator>
      <dc:date>2000-07-26T07:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: here-document &lt;&lt;EOF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432396#M3592</link>
      <description>echo "connect internalnalter system archive log current;" | svrmgrl &lt;BR /&gt;&lt;BR /&gt;should work just fine. The here document is only meaningful if you really have a long text. &lt;BR /&gt;&lt;BR /&gt;in the above string "connect internal" should have been followed by 'backslash'-'n' instead of just 'n'.</description>
      <pubDate>Thu, 27 Jul 2000 10:00:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432396#M3592</guid>
      <dc:creator>Dragan Krnic</dc:creator>
      <dc:date>2000-07-27T10:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: here-document &lt;&lt;EOF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432397#M3593</link>
      <description>echo "connect internal\nalter system archive log current;" | svrmgrl &lt;BR /&gt;&lt;BR /&gt;should work just fine. The here document is only meaningful if you really have a long text. &lt;BR /&gt;&lt;BR /&gt;(last try to make 'backslash' visible)</description>
      <pubDate>Thu, 27 Jul 2000 10:02:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/here-document-lt-lt-eof/m-p/2432397#M3593</guid>
      <dc:creator>Dragan Krnic</dc:creator>
      <dc:date>2000-07-27T10:02:14Z</dc:date>
    </item>
  </channel>
</rss>

