<?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: Replying to prompts within a script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/replying-to-prompts-within-a-script/m-p/5266008#M655346</link>
    <description>It is possible to write a program in such a way that it defeats simple I/O redirection (example: the "passwd" command), but I'd try this first:&lt;BR /&gt;&lt;BR /&gt;echo y | gfs_tool reclaim /gfs/saweb&lt;BR /&gt;&lt;BR /&gt;MK</description>
    <pubDate>Thu, 09 Dec 2010 15:04:18 GMT</pubDate>
    <dc:creator>Matti_Kurkela</dc:creator>
    <dc:date>2010-12-09T15:04:18Z</dc:date>
    <item>
      <title>Replying to prompts within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replying-to-prompts-within-a-script/m-p/5266007#M655345</link>
      <description>I want to run a command within a script, but the command requires a reply:&lt;BR /&gt;&lt;BR /&gt;# gfs_tool reclaim /gfs/saweb&lt;BR /&gt;Don't do this if this file system is being exported by NFS (on any machine).&lt;BR /&gt;&lt;BR /&gt;Are you sure you want to proceed? [y/n] n&lt;BR /&gt;gfs_tool: aborted&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;Is there a way to code this command in a script to supply it with a "y" to continue on ???</description>
      <pubDate>Thu, 09 Dec 2010 14:20:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replying-to-prompts-within-a-script/m-p/5266007#M655345</guid>
      <dc:creator>MikeL_4</dc:creator>
      <dc:date>2010-12-09T14:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Replying to prompts within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replying-to-prompts-within-a-script/m-p/5266008#M655346</link>
      <description>It is possible to write a program in such a way that it defeats simple I/O redirection (example: the "passwd" command), but I'd try this first:&lt;BR /&gt;&lt;BR /&gt;echo y | gfs_tool reclaim /gfs/saweb&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Thu, 09 Dec 2010 15:04:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replying-to-prompts-within-a-script/m-p/5266008#M655346</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-12-09T15:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Replying to prompts within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replying-to-prompts-within-a-script/m-p/5266009#M655347</link>
      <description>Matti&lt;BR /&gt;&lt;BR /&gt;Thanks, I wasn't even thinking of something so simple would work...</description>
      <pubDate>Thu, 09 Dec 2010 15:11:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replying-to-prompts-within-a-script/m-p/5266009#M655347</guid>
      <dc:creator>MikeL_4</dc:creator>
      <dc:date>2010-12-09T15:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Replying to prompts within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replying-to-prompts-within-a-script/m-p/5266010#M655348</link>
      <description>Sometimes that won't work.&lt;BR /&gt;&lt;BR /&gt;If you have a lot of yeses, you could use "yes"...&lt;BR /&gt;&lt;BR /&gt;yes | gfs_tool reclaim /gfs/saweb&lt;BR /&gt;&lt;BR /&gt;Or, you can also do something like this:&lt;BR /&gt;&lt;BR /&gt;gfs_tool reclaim /gfs/saweb &amp;lt;&amp;lt; EOL&lt;BR /&gt;y&lt;BR /&gt;EOL&lt;BR /&gt;&lt;BR /&gt;This will enter all of the replies in order. Works really well for configuring something larger too, like EMS. The example below would get you monitors for snmp, email and log outputs:&lt;BR /&gt;&lt;BR /&gt;/etc/opt/resmon/lbin/monconfig &amp;lt;&amp;lt; EOL&lt;BR /&gt;a&lt;BR /&gt;a&lt;BR /&gt;1&lt;BR /&gt;4&lt;BR /&gt;4&lt;BR /&gt;/var/opt/resmon/log/event.log&lt;BR /&gt;c&lt;BR /&gt;c&lt;BR /&gt;y&lt;BR /&gt;a&lt;BR /&gt;a&lt;BR /&gt;3&lt;BR /&gt;4&lt;BR /&gt;5&lt;BR /&gt;c&lt;BR /&gt;c&lt;BR /&gt;y&lt;BR /&gt;a&lt;BR /&gt;a&lt;BR /&gt;2&lt;BR /&gt;4&lt;BR /&gt;6&lt;BR /&gt;admins@mydomain.ca&lt;BR /&gt;c&lt;BR /&gt;c&lt;BR /&gt;y&lt;BR /&gt;a&lt;BR /&gt;a&lt;BR /&gt;3&lt;BR /&gt;5&lt;BR /&gt;3&lt;BR /&gt;c&lt;BR /&gt;c&lt;BR /&gt;y&lt;BR /&gt;a&lt;BR /&gt;a&lt;BR /&gt;4&lt;BR /&gt;5&lt;BR /&gt;3&lt;BR /&gt;c&lt;BR /&gt;c&lt;BR /&gt;y&lt;BR /&gt;a&lt;BR /&gt;a&lt;BR /&gt;5&lt;BR /&gt;5&lt;BR /&gt;3&lt;BR /&gt;c&lt;BR /&gt;c&lt;BR /&gt;y&lt;BR /&gt;e&lt;BR /&gt;q&lt;BR /&gt;EOL&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Dec 2010 14:00:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replying-to-prompts-within-a-script/m-p/5266010#M655348</guid>
      <dc:creator>Don Mallory</dc:creator>
      <dc:date>2010-12-10T14:00:35Z</dc:date>
    </item>
  </channel>
</rss>

