A very fun command: Stty

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.