====== Survival TECO ====== I think the next tutorial I write will be on a subset of the TECO command language sufficient to be able to do routine editing on small files. I think I can get the basics on a single page. It won't cover programming, which I am next-to-ignorant about, but should provide enough knowledge to get useful work done while getting a taste of the computing environment of ITS's (or TWENEX's) early days. Found two sources that will make better tutorial material than the more detailed document I started working on years ago. ===== Novice Subset of TECO ===== Source: [[http://www.avanthar.com/~healyzh/teco/TecoPocketGuide.html|TECO Pocket Guide. Digital Equipment Corporation. 1978. <http://www.avanthar.com/~healyzh/teco/TecoPocketGuide.html> accessed 4 June 2010.]] <code> NOVICE SUBSET OF TECO These commands allow you to do most common editing jobs on all versions of TECO. MAKE file Creates a new file (under RT-11, use CREATE command) TECO file Edits an existing file (under RT-11, use EDIT command) J Moves pointer to beginning of buffer ZJ Moves pointer to end of buffer L Advances pointer to beginning of next line nL Advances pointer n lines -nL Moves pointer back n lines 0L Moves pointer to beginning of current line C Advances pointer across one character nC Advances pointer across n characters -nC Moves pointer backwards across n characters T Types text from current pointer position to end of current line nT Types n lines on terminal HT Types entire content of text buffer 0TT Types current line Itext$ Inserts text before current pointer position K Deletes text from current pointer position to end of line nK Deletes n lines of text HK Deletes entire content of text buffer D Deletes the character following the pointer nD Deletes n characters after the pointer -nD Deletes n characters before the pointer P Outputs the current page and reads in the next page nP Executes the P command n times A Append the next input page to the end of the buffer EX Moves the remainder of the input file to the output file, closes the output file, and exits from TECO Stext$ Beginning at the current pointer position, searches for the specified text on the current page. The buffer pointer is positioned after the specified text if it is found. If the text is not found, an error message is given and the buffer pointer is left at the beginning of the page Ntext$ Same as Stext$ except that the search continues across page boundaries, if necessary, until the string or the end of the input file is encountered FStext1$text2$ Searches for text1 and, if found, replaces it with text2 </code> ===== Editing Commands ===== Source: [[http://www.avanthar.com/~healyzh/_info_/its.primer|V. Ellen Golden. An Introduction to ITS for the MACSYMA User. Massachusetts Institute of Technology Laboratory for Computer Science Mathlab Group. 14 April 1981. <http://www.avanthar.com/~healyzh/_info_/its.primer> accessed 4 June 2010.]] <code> V.B. Editing Commands A list of the most commonly used editing commands, in regular mode, follows: effect of command command advance cursor one line L go back one line -L move one character to the right C move one character to the left -C or R delete one character D (the next character after the cursor) kill from cursor position to end of K line (including carriage return and line feed) kill from cursor position to end of :K line (retaining carriage return and line feed) kill from cursor position to beginning 0K of line move to the beginning of the line 0L move to the end of the line :L redisplay screen (on a display terminal) ^L move to the top of the buffer J move to the end of the buffer ZJ move right one word FWR move left one word -FWR kill to the end of the buffer ZK Commands that take string arguments: to insert text I to search forward S (i.e. over text beyond cursor position) to search backward -S (i.e. over text that is before cursor position) Commands pertaining to printing terminals to type out the whole buffer HT to type out the current line 0TT (without moving the cursor) to type out the current line 0LT (moving cursor to beginning of line) to type out n lines nTT to automatically type out three lines :3^N each time two altmodes are typed Quit, or cancel command string typed ^G (but not executed yet) </code> ===== Next Step ===== TECO macros are beyond the scope of this "survival" tutorial, but a subject of historical significance and technical curiosity. I'll have to educate myself before I can write a tutorial. Maybe a good target application for a macro tutorial would be copy/cut-and-paste text in a buffer. UPDATE: Tutorial completed 2010/6/10 http://sdf.org/?tutorials/survival-teco {{tag>teco its tutorial}} Category: [[teco:]] ~~LINKBACK~~ ~~DISCUSSION~~