<?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: Scripting interactive command. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738929#M255863</link>
    <description>If the above don't work, then you may have to do this with expect:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.ee.ualberta.ca/hppd/hpux/Tcl/expect-5.43/" target="_blank"&gt;http://hpux.ee.ualberta.ca/hppd/hpux/Tcl/expect-5.43/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I attached a sftp expect script&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
    <pubDate>Fri, 24 Feb 2006 12:40:56 GMT</pubDate>
    <dc:creator>Geoff Wild</dc:creator>
    <dc:date>2006-02-24T12:40:56Z</dc:date>
    <item>
      <title>Scripting interactive command.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738923#M255857</link>
      <description>I have to run the following command on unix command line:&lt;BR /&gt;&lt;BR /&gt;nid TARGET=sys/password@TSH1 DBNAME=TSH2&lt;BR /&gt;&lt;BR /&gt;But this command runs interactively and asks me to enter (Y/[N]) as follows:&lt;BR /&gt;&lt;BR /&gt;Change database ID and database name TSH1 to TSH2? (Y/[N]) =&amp;gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I scripted it in a file to pass the value 'Y' as follows:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;ORACLE_SID=TSH1 ; export ORACLE_SID&lt;BR /&gt;nid TARGET=sys/password@TSH1 DBNAME=TSH2&lt;BR /&gt;Y&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But it didn't work, still asks me:&lt;BR /&gt;&lt;BR /&gt;Change database ID and database name TSH1 to TSH2? (Y/[N]) =&amp;gt; &lt;BR /&gt;&lt;BR /&gt;How to pass 'Y' in the script?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Gulam.</description>
      <pubDate>Fri, 24 Feb 2006 09:19:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738923#M255857</guid>
      <dc:creator>Gulam Mohiuddin</dc:creator>
      <dc:date>2006-02-24T09:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting interactive command.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738924#M255858</link>
      <description>Gulam,&lt;BR /&gt;have you tried a redirect?&lt;BR /&gt;echo "Y" &amp;gt; answers.lis &lt;BR /&gt;nid TARGET=sys/password@TSH1 DBNAME=TSH2 &amp;lt; answers.lis&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Feb 2006 09:21:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738924#M255858</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-02-24T09:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting interactive command.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738925#M255859</link>
      <description>Hi Gulam,&lt;BR /&gt;&lt;BR /&gt;You can try the here doc:&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;ORACLE_SID=TSH1 ; export ORACLE_SID&lt;BR /&gt;nid TARGET=sys/password@TSH1 DBNAME=TSH2 &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;Y&lt;BR /&gt;exit&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Renarios</description>
      <pubDate>Fri, 24 Feb 2006 09:29:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738925#M255859</guid>
      <dc:creator>renarios</dc:creator>
      <dc:date>2006-02-24T09:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting interactive command.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738926#M255860</link>
      <description>Try something like this:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;ORACLE_SID=TSH1 ; export ORACLE_SID&lt;BR /&gt;nid TARGET=sys/password@TSH1 DBNAME=TSH2 &amp;lt;&amp;lt; EOF&lt;BR /&gt;Y&lt;BR /&gt;EOF&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Feb 2006 09:30:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738926#M255860</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2006-02-24T09:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting interactive command.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738927#M255861</link>
      <description>Hi Gulam,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;        Yep the answer is Here statemnet.&lt;BR /&gt;&lt;BR /&gt;        Follow Patricks instruction. Note there should be a space between "&amp;lt;&amp;lt;" and "EOF". secondly the exit should be after the second EOF, as it is not a response your nid program awaits.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Senthil Kumar .A</description>
      <pubDate>Fri, 24 Feb 2006 11:30:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738927#M255861</guid>
      <dc:creator>Senthil Kumar .A_1</dc:creator>
      <dc:date>2006-02-24T11:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting interactive command.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738928#M255862</link>
      <description>You can use the here-document feature:&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;ORACLE_SID=TSH1 ; export ORACLE_SID&lt;BR /&gt;nid TARGET=sys/password@TSH1 DBNAME=TSH2 &amp;lt;&amp;lt; EOF&lt;BR /&gt;Y&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;For more info about here-document:&lt;BR /&gt;&lt;A href="http://wks.uts.ohio-state.edu/unix_course/intro-110.html" target="_blank"&gt;http://wks.uts.ohio-state.edu/unix_course/intro-110.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Fri, 24 Feb 2006 11:44:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738928#M255862</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2006-02-24T11:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting interactive command.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738929#M255863</link>
      <description>If the above don't work, then you may have to do this with expect:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.ee.ualberta.ca/hppd/hpux/Tcl/expect-5.43/" target="_blank"&gt;http://hpux.ee.ualberta.ca/hppd/hpux/Tcl/expect-5.43/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I attached a sftp expect script&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Fri, 24 Feb 2006 12:40:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-interactive-command/m-p/3738929#M255863</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2006-02-24T12:40:56Z</dc:date>
    </item>
  </channel>
</rss>

