The Stty command modifies the settings associated with the terminal command line.
Syntax Stty (options) (parameter) options
-A: Print all current configurations in an easy-to-read manner;
-G: Prints all current configurations in Stty readable mode.
Parameters
Terminal settings: Specifies the setting options for the terminal command line.
Instance
At the command line, disable the output capitalization method:
Stty IUCLC #开启
STTY-IUCLC #恢复
Suppress output lowercase at the command line:
Stty OLCUC #开启
STTY-OLCUC #恢复
Number of rows and columns printed out of terminal: Stty size
Ways to change Ctrl+d: Stty eof "string"
The system defaults to Ctrl+d to indicate the end of the file,
And by this way, you can change!
Shielding display: Stty-echo #禁止回显
Stty Echo #打开回显
Test method: Stty-echo;read;stty Echo;read
Ignore carriage return:
Stty IGNCR #开启
STTY-IGNCR #恢复
Timed input:
Timeout_read () {
Timeout=$1
old_stty_settings= ' stty-g ' #save current settings stty-icanon min 0 time #set 10seconds,not 100seconds Eval Read v Arname #=read $varname stty "$old _stty_settings" #recover settings}
A simpler approach is to take advantage of the Read command's-T option: read-t varname
From: Http://man.linuxde.net/stty
A very fun command: Stty