[TAG] Invisible Read!!
Benjamin A. Okopnik
ben at linuxgazette.net
Thu Aug 31 16:43:21 MSD 2006
On Thu, Aug 31, 2006 at 01:17:48PM +0100, Thomas Adam wrote:
> On 30/08/06, Vikas Mohan <vikas-m at chintech.org> wrote:
> > Sir,
> > iam trying to emulate a login session.
> >
> > login:<some login>
> > NOTE----------------------->password:<the text typed here should not be
> > visible> how to do this with shell script BASH.
> >
> > Please this is my assignment and iam a student.
>
> I assume you're referring to something like the following:
>
> ``
> echo "Input secret: "
> stty -echo
> read -k key
> [ "$key" == "$SomethingElse" ] && stty echo
> ''
Actually, I think it was more like
``
echo "Be vewy vewy quiet - I'm hunting GWADES! "
stty --turn_off_the_noise
read --please_please_keep_it_quiet dont_let_anyone_find_out
stty --not_crazy
echo "I didn't study..."|mail -s 'Please fail me!' professor at chintech.org
''
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
More information about the TAG
mailing list