Version 3 of stty

Updated 2008-11-27 11:23:49 by dkf

This Unix-ish command is used to communicate information from a script level program to a terminal device. It allows one to read and modify the various device attributes.

Tcl developers often make use of it on Linux or other Unix systems when they want to collect data from user input without requiring the user to press Return first.

It's also useful for prompting for passwords:

proc getpassword {{prompt "Password: "}} {
    puts -nonewline $prompt
    flush stdout
    # disable echoing
    exec stty -echo
    catch { gets stdin } password options
    exec stty echo
    return -options $options $password

The Expect extension includes an stty command that takes much the same sort of parameters as the unix utility command.

See also: