FreeBSD 4.11 manual page repository

FreeBSD is a free computer operating system based on BSD UNIX originally. Many IT companies, like DeployIS is using it to provide an up-to-date, stable operating system.

tput, clear - terminal capability interface

 

NAME

      tput, clear - terminal capability interface
 

SYNOPSIS

      tput [-T term] attribute
      clear
 

DESCRIPTION

      The tput command makes terminal-dependent information available to users
      or shell applications.  When invoked as the clear utility, the screen
      will be cleared as if
            tput clear
      had been executed.  The options to tput are as follows:
 
      -T      The terminal name as specified in the termcap database, for exam‐
              ple, “vt100” or “xterm”.  If not specified, tput retrieves the
              “TERM” variable from the environment.
 
      The tput command outputs a string if the attribute is of type string; a
      number if it is of type integer.  Otherwise, tput exits 0 if the terminal
      has the capability and 1 if it does not, without further action.
 
      If the attribute is of type string, and takes arguments (e.g. cursor
      movement, the termcap “cm” sequence) the arguments are taken from the
      command line immediately following the attribute.
 
      The following special attributes are available:
 
      clear         Clear the screen (the termcap “cl” sequence).
 
      init          Initialize the terminal (the termcap “is” sequence).
 
      longname      Print the descriptive name of the user’s terminal type.
 
      reset         Reset the terminal (the termcap “rs” sequence).
 

DIAGNOSTICS

      The exit value of tput is based on the last attribute specified.  If the
      attribute is of type string or of type integer, tput exits 0 if the
      attribute is defined for this terminal type and 1 if it is not.  If the
      attribute is of type boolean, tput exits 0 if the terminal has this
      attribute, and 1 if it does not.  The tput command exits 2 if any error
      occurred.
      termcap(5), terminfo(5)
 

BUGS

      The tput command can’t really distinguish between different types of
      attributes.
 
      Some termcap entries depend upon having a ‘%’ in them that is just a ‘%’
      and nothing more.  Right now we just warn about them if they don’t have a
      valid type declaration.  These warnings are sent to stderr.
 

HISTORY

      The tput command appeared in 4.4BSD.
 

Sections

Based on BSD UNIX
FreeBSD is an advanced operating system for x86 compatible (including Pentium and Athlon), amd64 compatible (including Opteron, Athlon64, and EM64T), UltraSPARC, IA-64, PC-98 and ARM architectures. It is derived from BSD, the version of UNIX developed at the University of California, Berkeley. It is developed and maintained by a large team of individuals. Additional platforms are in various stages of development.