<?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: Simple shell script question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909167#M106845</link>
    <description>John's assumption that db2 reads directly from its controlling terminal may be right...&lt;BR /&gt;&lt;BR /&gt;Probably you could tweak it using the attached small wrapper to detach your script from the terminal? Sometime application give up when there's no terminal. :)&lt;BR /&gt;&lt;BR /&gt;Compile it, e.g. as setsid:&lt;BR /&gt;&lt;BR /&gt;# cc -o setsid setsid.c&lt;BR /&gt;&lt;BR /&gt;Then run your shell script from it.&lt;BR /&gt;&lt;BR /&gt;# ./setsid yourscript.sh&lt;BR /&gt;&lt;BR /&gt;Best regards... Dietmar&lt;BR /&gt;</description>
    <pubDate>Thu, 20 Feb 2003 15:47:26 GMT</pubDate>
    <dc:creator>Dietmar Konermann</dc:creator>
    <dc:date>2003-02-20T15:47:26Z</dc:date>
    <item>
      <title>Simple shell script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909162#M106840</link>
      <description>I think I am in brain lock :-)&lt;BR /&gt;&lt;BR /&gt;I have a simple shell script:&lt;BR /&gt;&lt;BR /&gt;db2 &amp;lt;&amp;lt; EOF &lt;BR /&gt;CONNECT TO ISDEV&lt;BR /&gt;BACKUP DATABASE ISDEV TO /dev/rmt/2mnb WITH 2 BUFFERS BUFFER 1024&lt;BR /&gt;c&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;Here is what is supposed to happen&lt;BR /&gt;&lt;BR /&gt;1. Issue the CONNECT TO ISDEV to the db2 command.  This works fine.&lt;BR /&gt;2. Issue the BACKUP DATABASE ISDEV TO /dev/rmt/2mnb WITH 2 BUFFERS BUFFER 1024&lt;BR /&gt;to the db2 command.  This works fine.&lt;BR /&gt;&lt;BR /&gt;At this point, the db2 command returns the statement Press (c) to continue or (q) to quit.&lt;BR /&gt;&lt;BR /&gt;I am trying to pass the c to the db2 command in order to answer the question but it is not working.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Craig</description>
      <pubDate>Thu, 20 Feb 2003 13:46:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909162#M106840</guid>
      <dc:creator>Craig A. Sharp</dc:creator>
      <dc:date>2003-02-20T13:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Simple shell script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909163#M106841</link>
      <description>Craig,&lt;BR /&gt;&lt;BR /&gt;Try this one:&lt;BR /&gt;&lt;BR /&gt;db2 &amp;lt;&amp;lt; EOF &lt;BR /&gt;CONNECT TO ISDEV &lt;BR /&gt;BACKUP DATABASE ISDEV TO /dev/rmt/2mnb WITH 2 BUFFERS BUFFER 1024 &lt;BR /&gt;&lt;BR /&gt;c &lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;Note that I added a blank line right before the "c" line.&lt;BR /&gt;&lt;BR /&gt;Hai</description>
      <pubDate>Thu, 20 Feb 2003 14:03:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909163#M106841</guid>
      <dc:creator>Hai Nguyen_1</dc:creator>
      <dc:date>2003-02-20T14:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Simple shell script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909164#M106842</link>
      <description>Looks as though db2 is reading the reply from /dev/tty (your terminal connection) rather than from standard input.&lt;BR /&gt;&lt;BR /&gt;Is there any way to stop it asking for confirmation?&lt;BR /&gt;&lt;BR /&gt;If not, then you could use 'expect' to program this.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;John</description>
      <pubDate>Thu, 20 Feb 2003 14:04:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909164#M106842</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2003-02-20T14:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Simple shell script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909165#M106843</link>
      <description>Thanks for the replies.  The extra space did not work.  I have also checked to see if we can disable the confirmation but no luck.&lt;BR /&gt;&lt;BR /&gt;I have never used expect but the might be an idea to try.</description>
      <pubDate>Thu, 20 Feb 2003 14:24:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909165#M106843</guid>
      <dc:creator>Craig A. Sharp</dc:creator>
      <dc:date>2003-02-20T14:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Simple shell script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909166#M106844</link>
      <description>Hi Craig,&lt;BR /&gt;have you tried piping the "c" character to your script, e.g.:&lt;BR /&gt;# echo "c" | `your_script`&lt;BR /&gt;&lt;BR /&gt;The quoutes round your_script are back_quotes - try making a separate script with a content like above, although I admit it looks ugly.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Thu, 20 Feb 2003 14:28:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909166#M106844</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-02-20T14:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Simple shell script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909167#M106845</link>
      <description>John's assumption that db2 reads directly from its controlling terminal may be right...&lt;BR /&gt;&lt;BR /&gt;Probably you could tweak it using the attached small wrapper to detach your script from the terminal? Sometime application give up when there's no terminal. :)&lt;BR /&gt;&lt;BR /&gt;Compile it, e.g. as setsid:&lt;BR /&gt;&lt;BR /&gt;# cc -o setsid setsid.c&lt;BR /&gt;&lt;BR /&gt;Then run your shell script from it.&lt;BR /&gt;&lt;BR /&gt;# ./setsid yourscript.sh&lt;BR /&gt;&lt;BR /&gt;Best regards... Dietmar&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Feb 2003 15:47:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909167#M106845</guid>
      <dc:creator>Dietmar Konermann</dc:creator>
      <dc:date>2003-02-20T15:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Simple shell script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909168#M106846</link>
      <description>Hi, Craig, could you issue a ^M affer the c like this.&lt;BR /&gt;&lt;BR /&gt;.....&lt;BR /&gt;WITH 2 BUFFERS BUFFER 1024&lt;BR /&gt;c^M&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;remember: if you edit the file with vi, to put a ^M you must do it with a ^V^M&lt;BR /&gt;&lt;BR /&gt;Frank.</description>
      <pubDate>Thu, 20 Feb 2003 17:40:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-shell-script-question/m-p/2909168#M106846</guid>
      <dc:creator>Francisco J. Soler</dc:creator>
      <dc:date>2003-02-20T17:40:41Z</dc:date>
    </item>
  </channel>
</rss>

