|
|
1.1 ! root 1: #print ! 2: You may well ask how the editor knows which line to print. ! 3: The editor keeps track of the 'current line', which ! 4: is usually the last line you touched in any way. ! 5: When you begin editing a file, for example, the ! 6: current line is the last line. ! 7: If you want to print any particular line, however, ! 8: that is easy. For example, to print the 3rd line you say ! 9: 3p ! 10: To print the first line ! 11: 1p ! 12: (That's a one, no matter how much it looks like the letter "l".) ! 13: Here is a file: I'll put you into the editor ! 14: with that file as the 'current file' - print the 4th line, ! 15: then type 'w', 'q', and "ready" as usual. ! 16: #create Ref ! 17: :james madison ! 18: #create file ! 19: george washington ! 20: john adams ! 21: thomas jefferson ! 22: james madison ! 23: james monroe ! 24: john quincy adams ! 25: #print file ! 26: #copyout ! 27: #pipe ! 28: ex +'set prompt noopt open' file ! 29: #user ! 30: #unpipe ! 31: #uncopyout ! 32: grep madison .ocopy >X2 ! 33: #cmp Ref X2 ! 34: #log ! 35: #next ! 36: 7.1a 10
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.