This is an old revision of the document!
Version 3.0
Learning to speak a little TECO can be really useful to edit files on old DEC and related systems.
1. | ER file$Y 1 | Open file for input and read | 9. | J | Jump to beginning of file |
2. | EW file$1 | Open file for output | 10. | ZJ | Jump to end of file |
3. | EX | Save and exit | 11. | T 3 | Type from pointer to end of line |
4. | ^C ^C | Exit (no save) | 12. | V | Type current line |
5. | C 2 | Move character forward | 13. | D 2 | Delete character at pointer |
6. | R 2 | Move character backward | 14. | K 3 | Delete current line |
7. | L 3 | Move to beginning of next line | 15. | S text$ | Search for text |
8. | I text$ | Insert text | 16. | FS text1$text2$ | Substitute text2 for text1 |
ER
… and EW
… unnecessary. Some versions of TECO have a command EB
file$Y
that does the same as ER
… EW
… in one step. C
, R
, D
): move/delete multiple characters (negative reverses direction) L
, T
, K
): move/type/delete multiple lines (negative reverses direction); (T
, K
only) prefix H
: type/delete whole file “You can hack anything you want with TECO …”
This page is based on Survival TECO Version 2.0 at SDF.