<?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: unix script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550343#M876211</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;I don't suppose it could be as simple as&lt;BR /&gt;echo "yes" | command &lt;BR /&gt;&lt;BR /&gt;If you have more than one line you could build a tempfile&lt;BR /&gt;echo "yes" &amp;gt; /tmp/yn&lt;BR /&gt;echo "no" &amp;gt;&amp;gt; /tmp/yn&lt;BR /&gt;echo "exit" &amp;gt;&amp;gt; /tmp/yn&lt;BR /&gt;&lt;BR /&gt;command &amp;lt; /tmp/yn&lt;BR /&gt;rm /tmp/yn&lt;BR /&gt;&lt;BR /&gt;Clay&lt;BR /&gt;</description>
    <pubDate>Mon, 09 Jul 2001 15:57:34 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2001-07-09T15:57:34Z</dc:date>
    <item>
      <title>unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550341#M876209</link>
      <description>I'm writing a unix script that starts up a program called pgp. When it starts up it asks me a question that I would want to answer "yes" all the time. Can you help me??</description>
      <pubDate>Mon, 09 Jul 2001 15:50:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550341#M876209</guid>
      <dc:creator>Jade Bulante</dc:creator>
      <dc:date>2001-07-09T15:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550342#M876210</link>
      <description>Hi Jade:&lt;BR /&gt;&lt;BR /&gt;I'm going to assume that the program does a "read" looking for the "yes" response.  In that case, put "yes" into a file and redirect that file, like this:&lt;BR /&gt;&lt;BR /&gt;# ./mything &amp;lt; ./myresponse&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 09 Jul 2001 15:57:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550342#M876210</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-07-09T15:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550343#M876211</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;I don't suppose it could be as simple as&lt;BR /&gt;echo "yes" | command &lt;BR /&gt;&lt;BR /&gt;If you have more than one line you could build a tempfile&lt;BR /&gt;echo "yes" &amp;gt; /tmp/yn&lt;BR /&gt;echo "no" &amp;gt;&amp;gt; /tmp/yn&lt;BR /&gt;echo "exit" &amp;gt;&amp;gt; /tmp/yn&lt;BR /&gt;&lt;BR /&gt;command &amp;lt; /tmp/yn&lt;BR /&gt;rm /tmp/yn&lt;BR /&gt;&lt;BR /&gt;Clay&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Jul 2001 15:57:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550343#M876211</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-07-09T15:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550344#M876212</link>
      <description>Hi Jade:&lt;BR /&gt;&lt;BR /&gt;PGP usually allows the '--batch' option which suppresses all interacxtive input. This may fix you.&lt;BR /&gt;&lt;BR /&gt;Clay</description>
      <pubDate>Mon, 09 Jul 2001 16:06:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550344#M876212</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-07-09T16:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550345#M876213</link>
      <description>you could try:&lt;BR /&gt;&lt;BR /&gt;/what/ever/dir/pgp &amp;lt;&amp;lt; EOF&lt;BR /&gt;yes&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;...jcd...</description>
      <pubDate>Mon, 09 Jul 2001 16:24:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550345#M876213</guid>
      <dc:creator>Joseph C. Denman</dc:creator>
      <dc:date>2001-07-09T16:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550346#M876214</link>
      <description>I tried the steps you guys gave me but pgp is still waiting for a "yes" response. &lt;BR /&gt;&lt;BR /&gt;I tried all of them.&lt;BR /&gt;It's asking "do you want to use this public key?" and I need a "yes" response.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Jul 2001 17:19:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550346#M876214</guid>
      <dc:creator>Jade Bulante</dc:creator>
      <dc:date>2001-07-09T17:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550347#M876215</link>
      <description>This is not a gui program is it?&lt;BR /&gt;&lt;BR /&gt;All of these response should have worked.&lt;BR /&gt;&lt;BR /&gt;Exactly how are you starting the program?&lt;BR /&gt;&lt;BR /&gt;...jcd...</description>
      <pubDate>Mon, 09 Jul 2001 17:27:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550347#M876215</guid>
      <dc:creator>Joseph C. Denman</dc:creator>
      <dc:date>2001-07-09T17:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550348#M876216</link>
      <description>Your script may need multiple responses... &lt;BR /&gt;&lt;BR /&gt;try with:&lt;BR /&gt;&lt;BR /&gt;/dir1/pgp &amp;lt;&amp;lt; !&lt;BR /&gt;yes&lt;BR /&gt;yes&lt;BR /&gt;!&lt;BR /&gt;&lt;BR /&gt; you may use multiple "yes", there is no harm...&lt;BR /&gt;&lt;BR /&gt;Cheers...&lt;BR /&gt;Satish.</description>
      <pubDate>Mon, 09 Jul 2001 17:31:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550348#M876216</guid>
      <dc:creator>Satish Y</dc:creator>
      <dc:date>2001-07-09T17:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550349#M876217</link>
      <description>Hi Jade:&lt;BR /&gt;&lt;BR /&gt;The fundamental problem is that this input is not coming from stdin but another file descriptor. You could probably use lsof to determine the fdes and then within the shell do an exec 4&lt;BR /&gt;But a better way is to use the correct options for pgp. This site contains the documentation you need and in particular how to run pgp in an automated environment:&lt;BR /&gt;&lt;A href="http://www.gnupg.org" target="_blank"&gt;http://www.gnupg.org&lt;/A&gt;</description>
      <pubDate>Mon, 09 Jul 2001 17:35:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550349#M876217</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-07-09T17:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550350#M876218</link>
      <description>I'm starting the program by calling a script called script:&lt;BR /&gt;In that script file is the following&lt;BR /&gt;&lt;BR /&gt;pgp -e filename username&lt;BR /&gt;&lt;BR /&gt;This geberates the question that I have to answer with a "yes".</description>
      <pubDate>Mon, 09 Jul 2001 17:36:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550350#M876218</guid>
      <dc:creator>Jade Bulante</dc:creator>
      <dc:date>2001-07-09T17:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550351#M876219</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;You might need to look at using a program like 'expect', which uses a scripting language to provide input for interactive programs.  We used it at my last job to automate building Unix systems; we used it to allow a script to run the 'passwd' program to automatically generate user passwords (this was another flavor of Unix).&lt;BR /&gt;&lt;BR /&gt;You can get 'expect' from the HP-UX Porting and Archive Centre at this URL:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://gatekeep.cs.utah.edu/hppd/hpux/Tcl/expect-5.31/" target="_blank"&gt;http://gatekeep.cs.utah.edu/hppd/hpux/Tcl/expect-5.31/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Jul 2001 17:47:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2550351#M876219</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2001-07-09T17:47:05Z</dc:date>
    </item>
  </channel>
</rss>

