United States-English |
|
|
HP-UX Reference > Ttput(1)HP-UX 11i Version 3: February 2007 |
|
NAMEtput — query terminfo database DESCRIPTIONThe tput command uses the terminfo database to make terminal-dependent capabilities and information available to the shell (see terminfo(4)). The tput command outputs a string if the attribute (capname) is of type string, or an integer if the attribute is of type integer. If the attribute is of type boolean, tput simply sets the exit code (0 for TRUE, 1 for FALSE), and produces no output. Command-line ArgumentsThe tput command recognizes the following command-line arguments:
EXAMPLESEcho clear-screen sequence for the current terminal. tput clear Print the number of columns for the current terminal. tput cols Print the number of columns for the 70092 terminal. tput -T70092 cols Set shell variable bold to stand-out-mode sequence for current terminal. bold=`tput smso` This might be followed by a prompt:
Set exit code to indicate if current terminal is a hard copy terminal. tput hc Clear the screen, move the cursor to line 10, column 20 and turn on bold. tput -S <<EOF clear cup 10 20 bold EOF RETURN VALUEIf capname is of type boolean, then the exit code is set to 0 for true and 1 for false. If capname is not of type boolean and tput fails, an error message is printed, and exit code is set to one of the following depending on the failure:
If the exit code is 0, a -1 is printed if a capability name of type integer is requested for a terminal that has no entry for that capability name in the terminfo database (such as tput -Thp70092 vt). |
Printable version | ||
|