<?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: Automating a script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970868#M785071</link>
    <description>Chris...forgot to post the URL in my last post; make sure you are including the double quotes and the line-wrap effect in you command. Anyhow take a look at the original&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.backupcentral.com/infback.html" target="_blank"&gt;http://www.backupcentral.com/infback.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;cheers!</description>
    <pubDate>Thu, 30 Mar 2006 14:11:07 GMT</pubDate>
    <dc:creator>Sandman!</dc:creator>
    <dc:date>2006-03-30T14:11:07Z</dc:date>
    <item>
      <title>Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970856#M785059</link>
      <description>Hello, I am having some trouble with scripting. I am not well versed in it so I was praying for some help. I am trying to automate archiving for our informix database on an HP-UX 11.0 system. the problem I am having is when I enter the command it needs to have someone hit the enter key once a tape is in. We want it to just start. I have tried 2 suggestions and niether worked they were:&lt;BR /&gt;&lt;BR /&gt;ontape -s -L 0&amp;lt;&lt;HIT&gt;&lt;/HIT&gt;  \n&lt;BR /&gt;  \n&lt;BR /&gt;  hit&lt;BR /&gt;&lt;BR /&gt;and the other was (press_enter_here = a return in the script):&lt;BR /&gt;&lt;BR /&gt;ontape -s -L 0 &amp;lt;&lt;HIT&gt;&lt;/HIT&gt; press_enter_here&lt;BR /&gt;  hit&lt;BR /&gt;&lt;BR /&gt;I thank you in advance for all your assistance.</description>
      <pubDate>Thu, 30 Mar 2006 12:49:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970856#M785059</guid>
      <dc:creator>Chris Weislak</dc:creator>
      <dc:date>2006-03-30T12:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970857#M785060</link>
      <description>I also tried:&lt;BR /&gt;&lt;BR /&gt;echo "0\n" |ontape -s -L 0&lt;BR /&gt;&lt;BR /&gt;which did not work.</description>
      <pubDate>Thu, 30 Mar 2006 12:53:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970857#M785060</guid>
      <dc:creator>Chris Weislak</dc:creator>
      <dc:date>2006-03-30T12:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970858#M785061</link>
      <description>Try with:&lt;BR /&gt;&lt;BR /&gt;ontape -s -L 0&amp;lt;&lt;HIT&gt;&lt;/HIT&gt;&lt;HERE press="" ctrl=""&gt;&lt;BR /&gt;hit&lt;BR /&gt;&lt;BR /&gt;The ontape command does not have and option to avoid the prompting for ENTER?&lt;BR /&gt;&lt;BR /&gt;&lt;/HERE&gt;</description>
      <pubDate>Thu, 30 Mar 2006 13:00:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970858#M785061</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-03-30T13:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970859#M785062</link>
      <description>using bourne shell or ksh, this would look like &lt;BR /&gt;&lt;BR /&gt;echo "put tape and press enter key"&lt;BR /&gt;read rep&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Mar 2006 13:03:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970859#M785062</guid>
      <dc:creator>Antonio Cardoso_1</dc:creator>
      <dc:date>2006-03-30T13:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970860#M785063</link>
      <description>have a look at this for more on using shell scripts:&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-90046/" target="_blank"&gt;http://docs.hp.com/en/B2355-90046/&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Mar 2006 13:05:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970860#M785063</guid>
      <dc:creator>Antonio Cardoso_1</dc:creator>
      <dc:date>2006-03-30T13:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970861#M785064</link>
      <description>The trick is to simply redirect stdout. When ontape determines that stdout is not a tty device then it does not prompt.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ontape -s -L 0 &amp;gt;&amp;gt; /var/tmp/myontape.log&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Mar 2006 13:07:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970861#M785064</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-03-30T13:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970862#M785065</link>
      <description>I tried the above suggestion and it did not work.&lt;BR /&gt;what informix says to try is:&lt;BR /&gt;&lt;BR /&gt;echo "\n" | ontape -s -L 0 | tee -a $LOG&lt;BR /&gt;&lt;BR /&gt;which did not work. there is no switch for ontape that would skip the message.&lt;BR /&gt;&lt;BR /&gt;as for the shell it would be posix I think. I do know it is not Bourne.</description>
      <pubDate>Thu, 30 Mar 2006 13:09:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970862#M785065</guid>
      <dc:creator>Chris Weislak</dc:creator>
      <dc:date>2006-03-30T13:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970863#M785066</link>
      <description>I tried the suggestion to output it to a file. It did not start writing to the tape until I hit enter. So it still needed the return key hit tough all the output went to the file.&lt;BR /&gt;This is so weird. Informix says it can be done but I keep trying their suggestions and none seem to work.</description>
      <pubDate>Thu, 30 Mar 2006 13:22:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970863#M785066</guid>
      <dc:creator>Chris Weislak</dc:creator>
      <dc:date>2006-03-30T13:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970864#M785067</link>
      <description>Is it possible to make the script sleep for a few seconds in between starting the command and pressing return. so that maybe the \n could work if applied after a few moments.&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Mar 2006 13:26:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970864#M785067</guid>
      <dc:creator>Chris Weislak</dc:creator>
      <dc:date>2006-03-30T13:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970865#M785068</link>
      <description>Hi Chris,&lt;BR /&gt;&lt;BR /&gt;Take a look at expect, which is a tool designed explicitly for automating such tasks...&lt;A href="http://expect.nist.gov/" target="_blank"&gt;http://expect.nist.gov/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;cheers!</description>
      <pubDate>Thu, 30 Mar 2006 13:37:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970865#M785068</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-03-30T13:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970866#M785069</link>
      <description>Here's something I found on Google...&lt;BR /&gt;&lt;BR /&gt;LEVEL=0 &lt;BR /&gt;echo "$LEVEL &lt;BR /&gt;&lt;BR /&gt;"| ontape -s | head -100 &amp;gt; /tmp/logfile &lt;BR /&gt;&lt;BR /&gt;hope it helps!</description>
      <pubDate>Thu, 30 Mar 2006 13:48:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970866#M785069</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-03-30T13:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970867#M785070</link>
      <description>that did enter the proper level but still it prompts for you to press the return key.&lt;BR /&gt;It seems that it is looking for that specific key. I typed a bunch of letters and numbers but nothing happened till I pressed the return key.&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Mar 2006 14:07:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970867#M785070</guid>
      <dc:creator>Chris Weislak</dc:creator>
      <dc:date>2006-03-30T14:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970868#M785071</link>
      <description>Chris...forgot to post the URL in my last post; make sure you are including the double quotes and the line-wrap effect in you command. Anyhow take a look at the original&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.backupcentral.com/infback.html" target="_blank"&gt;http://www.backupcentral.com/infback.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;cheers!</description>
      <pubDate>Thu, 30 Mar 2006 14:11:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970868#M785071</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-03-30T14:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970869#M785072</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can use the attached script, just update it according to your needs and Informix version.&lt;BR /&gt;&lt;BR /&gt;HTH</description>
      <pubDate>Thu, 30 Mar 2006 14:25:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970869#M785072</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2006-03-30T14:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Automating a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970870#M785073</link>
      <description>This has been very helpful. Thank you all so much for your help.</description>
      <pubDate>Thu, 30 Mar 2006 14:42:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-a-script/m-p/4970870#M785073</guid>
      <dc:creator>Chris Weislak</dc:creator>
      <dc:date>2006-03-30T14:42:11Z</dc:date>
    </item>
  </channel>
</rss>

