Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* script doesn't work in Digital
@ 2000-04-07  4:00 ckyim
  0 siblings, 0 replies; only message in thread
From: ckyim @ 2000-04-07  4:00 UTC (permalink / raw)


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 '<do something>' debug

But I found it can only work in writing simple command within '<do
something>'. 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








^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-04-07  4:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-07  4:00 script doesn't work in Digital ckyim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox