From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,7d0fc1561b0f31a3,start X-Google-Attributes: gidfee84,public From: "ckyim" Subject: script doesn't work in Digital Date: 2000/04/07 Message-ID: <8cku54$e5v4@imsp212.netvigator.com>#1/1 X-Deja-AN: 608025643 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Organization: IMS Netvigator X-MSMail-Priority: Normal Newsgroups: comp.unix.osf.osf1 HI, Q1. The following script works in other Unix except Digital. It is used for input one char with no need pressing 'enter'. Anyone can help me to modify it to work in Digital : readkey(){ oldstty=`stty -g` stty -icanon -echo min 1 time 0 dd bs=1 count=1 <&0 2>/dev/null stty $oldstty } echo "Enter a keystroke \c" key=`readkey` echo "\nkey is "$key Q2. I intend to trace each shell command line at shell prompt after excuted and then do something : => trap '' debug But I found it can only work in writing simple command within ''. I encounted the problem as below. e.g case 1. trap 'echo abc' debug ----- if following input at shell prompt: $date (works) $w | more (works) case 2. trap 'date' debug ---- if following input at shell prompt: $date (works) $w | more (infinite wating more) Thanks a lot if anyone can help me. Regards, yarsawelba@hongkong.com