stty
Last updated
Last updated
stty olcuc #开启
stty -olcuc #恢复stty sizestty eof "string"stty -echo #禁止回显
stty echo #打开回显stty -echo;read;stty echo;readstty igncr #开启
stty -igncr #恢复timeout_read()
{
timeout=$1
old_stty_settings=`stty -g` #save current settings
stty -icanon min 0 time 100 #set 10seconds,not 100seconds
eval read varname #=read $varname
stty "$old_stty_settings" #recover settings
}read -t 10 varname