<?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: Menu script with inactivity timer ? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-script-with-inactivity-timer/m-p/3193937#M165239</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;Jeroen is quite correct with&lt;BR /&gt;&lt;BR /&gt;my_command==`line -t &lt;SECONDS&gt;`&lt;BR /&gt;&lt;BR /&gt;test like this&lt;BR /&gt;&lt;BR /&gt;my_command=`line -t 3`&lt;BR /&gt;  if [ -z "$my_command" ]&lt;BR /&gt;  then&lt;BR /&gt;    my_command=exit&lt;BR /&gt;  fi&lt;BR /&gt;  echo $my_command&lt;BR /&gt;&lt;BR /&gt;             Steve Steel&lt;/SECONDS&gt;</description>
    <pubDate>Tue, 17 Feb 2004 07:46:28 GMT</pubDate>
    <dc:creator>Steve Steel</dc:creator>
    <dc:date>2004-02-17T07:46:28Z</dc:date>
    <item>
      <title>Menu script with inactivity timer ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-script-with-inactivity-timer/m-p/3193933#M165235</link>
      <description>I have written a simple helpdesk menu script which allows Helpdesk to reset passwords, reactivate users etc. in a Trusted HP-UX environment using sudo.&lt;BR /&gt;&lt;BR /&gt;What I'm looking for is a simple way to exit the script after xx minutes of inactivity.&lt;BR /&gt;&lt;BR /&gt;I was thinking about the TMOUT variable in posix shell, but since the script never returns to the prompt (read my_command) this don't help.&lt;BR /&gt;&lt;BR /&gt;Any idea's on how to do this ?&lt;BR /&gt;&lt;BR /&gt;Haakon&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Feb 2004 06:49:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-script-with-inactivity-timer/m-p/3193933#M165235</guid>
      <dc:creator>Håkon Wøien</dc:creator>
      <dc:date>2004-02-17T06:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Menu script with inactivity timer ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-script-with-inactivity-timer/m-p/3193934#M165236</link>
      <description>Try this trick.&lt;BR /&gt; &lt;BR /&gt;Start a "sleep" in the background which is set to kill the menu script.  If a menu option is selected, kill the sleep. Something like this&lt;BR /&gt; &lt;BR /&gt;#all your menu code goes here&lt;BR /&gt;( sleep 10; kill $$)&amp;amp; # kill my menu script&lt;BR /&gt;# get an option&lt;BR /&gt;kill $! # kill last job run in the background</description>
      <pubDate>Tue, 17 Feb 2004 07:08:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-script-with-inactivity-timer/m-p/3193934#M165236</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-17T07:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Menu script with inactivity timer ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-script-with-inactivity-timer/m-p/3193935#M165237</link>
      <description>Hi,&lt;BR /&gt;try do do something with uptime or w command to estimate idle time.&lt;BR /&gt;Borislav</description>
      <pubDate>Tue, 17 Feb 2004 07:10:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-script-with-inactivity-timer/m-p/3193935#M165237</guid>
      <dc:creator>Borislav Perkov</dc:creator>
      <dc:date>2004-02-17T07:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Menu script with inactivity timer ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-script-with-inactivity-timer/m-p/3193936#M165238</link>
      <description>You can use the command&lt;BR /&gt;my_command=`line -t &lt;SECONDS&gt;`&lt;BR /&gt;&lt;BR /&gt;to read a line from input.&lt;BR /&gt;So if your menu is usually waiting for the next command to execute, you may use this command wirh a timeout, in which case my_command is empty.&lt;BR /&gt;&lt;BR /&gt;Check the manpage for portability issues.&lt;BR /&gt;I don't know how to distinguish a timeout from a simple &lt;ENTER&gt;.&lt;BR /&gt;&lt;BR /&gt;JP.&lt;BR /&gt;&lt;/ENTER&gt;&lt;/SECONDS&gt;</description>
      <pubDate>Tue, 17 Feb 2004 07:26:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-script-with-inactivity-timer/m-p/3193936#M165238</guid>
      <dc:creator>Jeroen Peereboom</dc:creator>
      <dc:date>2004-02-17T07:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Menu script with inactivity timer ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/menu-script-with-inactivity-timer/m-p/3193937#M165239</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Jeroen is quite correct with&lt;BR /&gt;&lt;BR /&gt;my_command==`line -t &lt;SECONDS&gt;`&lt;BR /&gt;&lt;BR /&gt;test like this&lt;BR /&gt;&lt;BR /&gt;my_command=`line -t 3`&lt;BR /&gt;  if [ -z "$my_command" ]&lt;BR /&gt;  then&lt;BR /&gt;    my_command=exit&lt;BR /&gt;  fi&lt;BR /&gt;  echo $my_command&lt;BR /&gt;&lt;BR /&gt;             Steve Steel&lt;/SECONDS&gt;</description>
      <pubDate>Tue, 17 Feb 2004 07:46:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/menu-script-with-inactivity-timer/m-p/3193937#M165239</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2004-02-17T07:46:28Z</dc:date>
    </item>
  </channel>
</rss>

