How to use stty?

Hi ,

I have shell scripting in linux box. This script is mentioned that should be run under the one particular user. If you run that mentioned user location then it is working fine....

Suppose if you are trying run from some other user like as mentioned below

sudo su - gxadm -c script.sh 

then it is not working ... I am thinking that the problem is happan due to below lines..

    printf "    Type choice:  "
    stty raw
    choice=`dd if=/dev/tty bs=1 count=1 2>/dev/null`
    stty -raw
    echo

Please advice if you are expert in stty

Thx,
Mani

---------- Post updated at 01:55 AM ---------- Previous update was at 01:51 AM ----------

Hi ,, I would like to update problem if i run from other...

Problem is while loop execute frequently .... it is not stopping....

What you are saying - the script runs when usera (only) executes the script.
When userb executes the script it "doesn't work". What does "does'nt work" mean?

The screen has garbage on it? The script exits when it should not? The terminal freezes?