<?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: silent read in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/silent-read/m-p/4909709#M405919</link>
    <description>thanks to  Rodney Hills &amp;amp;  A. Clay Stephenson&lt;BR /&gt;&lt;BR /&gt;stty -echo&lt;BR /&gt;read x&lt;BR /&gt;stty echo&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;echo "Enter password: \c"&lt;BR /&gt;trap 'stty echo' 0 1 2 15&lt;BR /&gt;stty -echo&lt;BR /&gt;read PW&lt;BR /&gt;stty echo&lt;BR /&gt;&lt;BR /&gt;Oh and my good friend Leigh</description>
    <pubDate>Wed, 29 Jun 2005 10:14:00 GMT</pubDate>
    <dc:creator>cryptmonkey</dc:creator>
    <dc:date>2005-06-29T10:14:00Z</dc:date>
    <item>
      <title>silent read</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/silent-read/m-p/4909706#M405916</link>
      <description>I'm writing a shell script,and I want to accept a password from the user, but I don't want the echo  output to screen. (as READ does).&lt;BR /&gt;I'm being lazy as I could write the script in PERL or C but I'd prefer to KISS and do it as a UNIX shell.</description>
      <pubDate>Wed, 29 Jun 2005 09:45:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/silent-read/m-p/4909706#M405916</guid>
      <dc:creator>cryptmonkey</dc:creator>
      <dc:date>2005-06-29T09:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: silent read</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/silent-read/m-p/4909707#M405917</link>
      <description>stty -echo&lt;BR /&gt;read x&lt;BR /&gt;stty echo&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Wed, 29 Jun 2005 09:51:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/silent-read/m-p/4909707#M405917</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2005-06-29T09:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: silent read</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/silent-read/m-p/4909708#M405918</link>
      <description>While all you need to do is a stty -echo, it is very important that the terminal not be left in this state (process dies, or n'rupt before doing a stty echo). You should always have a trap to reset the terminal because the tty settings affect not just this process but the terminal device itself. &lt;BR /&gt;&lt;BR /&gt;The better way is:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;echo "Enter password: \c"&lt;BR /&gt;trap 'stty echo' 0 1 2 15&lt;BR /&gt;stty -echo&lt;BR /&gt;read PW&lt;BR /&gt;stty echo&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Now no matter if you enter a Ctrl-C, for example, the terminal will be restored to sane vales. I suggest the you omit the trap and Cntl-C the password entry to see what I am talking about.&lt;BR /&gt;------------------------------</description>
      <pubDate>Wed, 29 Jun 2005 10:01:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/silent-read/m-p/4909708#M405918</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-06-29T10:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: silent read</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/silent-read/m-p/4909709#M405919</link>
      <description>thanks to  Rodney Hills &amp;amp;  A. Clay Stephenson&lt;BR /&gt;&lt;BR /&gt;stty -echo&lt;BR /&gt;read x&lt;BR /&gt;stty echo&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;echo "Enter password: \c"&lt;BR /&gt;trap 'stty echo' 0 1 2 15&lt;BR /&gt;stty -echo&lt;BR /&gt;read PW&lt;BR /&gt;stty echo&lt;BR /&gt;&lt;BR /&gt;Oh and my good friend Leigh</description>
      <pubDate>Wed, 29 Jun 2005 10:14:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/silent-read/m-p/4909709#M405919</guid>
      <dc:creator>cryptmonkey</dc:creator>
      <dc:date>2005-06-29T10:14:00Z</dc:date>
    </item>
  </channel>
</rss>

