-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
I don't think you can do it easily in a shell script. A C or Perl program
could put the terminal in raw mode and echo *'s. The program would also
have to handle input editing itself.
--
Barry Margolin, bar...@bbnplanet.com
GTE Internetworking, Powered by BBN, Cambridge, MA
Support the anti-spam movement; see <http://www.cauce.org/>
Please don't send technical questions directly to me, post them to newsgroups.
Hope that helps. Pls. let me know if it worked.
Yes, it is... Here is some ksh script to do this.
++++++++++++++ START SCRIPT ++++++++++++++
#!/bin/ksh
#Init some stuff...
pass=''
blank='false'
#Main loop executed once for each char typed...
while [ "$blank" != "true" ]
do
stty raw
c=`dd bs=1 count=1 2> /dev/null`
stty -raw
#Check for a CR.
if [ -z `echo $c | tr -d "\015"` ]
then
blank='true'
else
stty echo
echo "*\c"
pass=$pass$c
stty -echo
fi
done
+++++++++++++ END OF SCRIPT ++++++++++++
You may want to check the man pages for dd and for tr if you need
more help with this script. Feel free to email any follow up ?'s to
me at "dwj...@azstarnet.com". I will post the final answers here...
Hope this helps you out....
Dj