Hyde County, South Dakota is the Pin Tail Duck capital of the world. Visit scenic Highmore, SD in 2005!
home
Site map
Programming
February 2005
email

The TECO command set

The following compilation of TECO commands was kindly provided by Peter Neilson.

      NULL   Discarded on input; Ignored in commands
      ^A     Output message to terminal
      ^B     Current date
      ^C     Stop execution
      ^D     Set radix to decimal
      ^E     Form Feed flag
      ^E  (Match char) Match ASCII code n
      ^EA    (Match char) Match alphabetics
      ^EB    (Match char) Match separator char
      ^EC    (Match char) Match Symbol Constituent
      ^ED    (Match char) Match numerics
      ^EGq   (Match char) Match contents of Q-reg
      ^EL    (Match char) Match line terminators
      ^EMx   (Match char) Match any number of x
      ^EQq   (String char) Use contents of Q-reg q
      ^ER    (Match char) Match alphanumerics
      ^ES    (Match char) Match non-null space/tab
      ^EUq   (String char) Use ASCII code in Q-reg
      ^EV    (Match char) Match lower case alphabet
      ^EW    (Match char) Match upper case alphabet
      ^EX    (Match char) Match any character
      ^E[]   (Match char) Match one of list
      ^F     Contents of console switch register
      n^F    Return terminal number of job n
      ^G^G   Kill command string
      ^G Retype current command line
      ^G*    Retype current command input
      ^H     Current time of day
      BS     Back up and type one line
      TAB    Insert tab and text
      LF     Line terminator; Ignored in commands
      LF     Advance and type one line
      VT     Line terminator; Not a TECO command
      FF     Page terminator; Output Form Feed
      CR     End input line; Ignored in commands
      ^N     End of file flag
      ^Nx    (Match char) Match all but x
      ^O     Set radix to octal
      ^O     Kill terminal output
      ^P     Not a TECO command
      ^Q     Resume terminal output
      ^Q     Convert line arg into character arg
      ^Qx    (String char) Use x literally
      ^R     Value of current radix
      n^R    Set radix to n
      ^Rx    (String char) Use x literally
      ^S     -(length) of last referenced string
      ^S     Suspend terminal output
      ^S     Save last command string
      ^S     (Match char) Match separator char
      ^T     ASCII value of next character typed
      ^T     Read and decode next keystroke typed
      n^T    Type ASCII character of value n
      n:^T	Output binary byte of value n
      ^U     Kill command line
      ^Uq    Put string into Q-register q
      :^Uq   Append string to Q-register q
      n^Uq   Put ASCII char "n" into Q-register q
      n:^Uq  Append ASCII char "n" to Q-register q
      ^V     Enable lower case conversion
      ^Vx    (String char) Force x to lower case
      ^W     Enable upper case conversion
      ^W     Refresh scrolled display
      ^Wx    (String char) Force x to upper case
      ^X     Search mode flag
      ^X     (Match char) Match any character
      ^Y     Equivalent to ".+^S,."
      ^Z     Size of text in all Q-registers
      ^Z^Z^Z Immediate exit from TECO
      ESC    String and command terminator
      ESC    String and command terminator
      ^[     String and command terminator
      ^     Not a TECO command
      ^]     Not a TECO command
      ^^x    ASCII value of x
      ^_     Ones complement (logical NOT)
      SP     Ignored in commands
      !      Define label
      "      Start conditional
      n"<    Test for less than zero
      n"=    Test for equal to zero
      n">    Test for greater than zero
      n"A    Test for alphabetic
      n"C    Test for symbol constituent
      n"D    Test for numeric
      n"E    Test for equal to zero
      n"F    Test for false
      n"G    Test for greater than zero
      n"L    Test for less than zero
      n"N    Test for not equal to zero
      n"R    Test for alphanumeric
      n"S    Test for successful
      n"T    Test for true
      n"U    Test for unsuccessful
      n"V    Test for lower case
      n"W    Test for upper case
      #      Logical OR
      $      Separate TECO commands
      $      ESCape (no surrogate) typeout
      n%q    Add n to Q-register q and return result
      &      Logical AND
      '      End conditional
      (      Expression grouping
      )      Expression grouping
      *      Multiplication
      *q     Save last command in Q-register q
      +      Addition
      ,      Argument separator
      -      Subtraction or negation
      .      Current pointer position
      /      Division
      /      Type detailed explanation of error
      0-9    Digit
      :      Modify next command
      ;      Exit iteration on search failure
      n;     Exit iteration if n is positive
      :;     Exit iteration on search success
      n:;    Exit iteration if n is negative
      n<     Iterate n times
      =      Type in decimal
      ==     Type in octal
      ===    Type in hexadecimal
      :=     Type in decimal, no carriage return
      :==    Type in octal, no carriage return
      :===   Type in hexadecimal, no carriage return
      >      End iteration
      ?      Toggle trace mode
      ?      Type out command string in error
      @      Modify next text argument
      A      Append to buffer
      nA     ASCII value of char in buffer
      n:A    Append n lines to buffer
      B      0 - beginning of buffer
      nC     Advance n characters
      nD     Delete n characters
      m,nD   Delete between m and n
      DELIM  Character typed as surrogate for ESCa
      DELIM  Advance and type one line
      E%q    Write Q-register q into a file
      EA     Select secondary output stream
      EB     Open input and output
      EC     Close out (copy in to out and close)
      ED     Edit mode flag
      EE     ESCape surrogate character
      EF     Close output file
      EG     Close out and exit with command
      :EG    Execute operating system function
      EH     Help level flag
      EI     Open indirect command file
      m,nEJ  Set environment characteristics
      nEJ    Return environment characteristics
      EK     Kill output file
      EL     Open log file
      nEM    Position magtape
      EN     Wildcard lookup
      EO     Version of TECO
      nEO    Set TECO to function as version n
      EP     Select secondary input stream
      EQq    Read file into Q-register q
      ER     Open input file
      ES     Search verification flag
      ET     Type out control flag
      EU     Case flagging flag
      EV     Edit verify flag
      EW     Open output file
      EX     Close out and exit
      EY     Read without yank protection
      EZ     Zero output tape
      nE_    Search without yank protection
      F'     Flow to end of conditional
      F<     Flow to start of iteration
      F>     Flow to end of iteration
      F|     Flow to ELSE part of conditional
      m,nFB  Search between locations m and n
      nFB    Search, bounded by n lines
      m,nFC  Search and replace between m and n
      nFC    Search and replace over n lines
      nFD    Search and delete string
      nFK    Search and delete intervening text
      nFN    Global string replace
      FR     Replace last string
      nFS    Local string replace
      nF_    Destructive search and replace
      Gq     Get string from Q-register q into buffer
      G*     Get last filespec string into buffer
      :Gq    Type Q-register q on terminal
      G_     Get last search string into buffer
      H      Equivalent to "B,Z"
      I      Insert text
      nI     Insert ASCII character "n"
      nJ     Move pointer to "n"
      nK     Kill n lines
      m,nK   Delete between m and n
      nL     Advance n lines
      Mq     Execute string in Q-register q
      nN     Global search
      O      Go to label
      nO     Computed goto
      nP     Advance or back up n pages
      m,nP   Write out chars m to n
      nPW    Write buffer n times
      m,nPW  Write out chars m to n
      Qq     Number in Q-register q
      :Qq    Size of text in Q-register q
      nR     Back up n characters
      nS     Local search
      m,nS   Search for nth occurrence within m characters
      ::S    Compare string
      SEEALL "View All" characters display mode
      nT     Type n lines
      m,nT   Type from m to n
      nUq    Put number n into Q-register q
      nV     Type n current lines
      m,nV   Type m before & n after current line
      W      Scope "WATCH"
      n:W    Return scope characteristics
      m,n:W  Set scope characteristics
      nXq    Put n lines into Q-register q
      m,nXq  Put characters m to n into Q-register q
      n:Xq   Append n lines to Q-register q
      m,n:Xq Append characters m to n into Q-register q
      Y      Read into buffer
      Z      End of buffer value
      [q     Q-register push
            Value of digit string in buffer
      n     Convert n to digits in buffer
      ]q     Q-register pop
      n_     Global search without output
      `      ESCape surrogate typeout
      a-z    Treated the same as upper case A-Z
      {      Not a TECO command
      |      Start ELSE part of conditional
      }      Not a TECO command
      ~      Not a TECO command
      DEL    Delete last character typed in

This page was last updated February 1, 2005.

home
Site map
Programming
February 2005
email
Hyde County, South Dakota is the Pin Tail Duck capital of the world. Visit scenic Highmore, SD in 2005!