MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | NAME |
| 2 | ed6 |
| 3 | |
| 4 | DESCRIPTION |
| 5 | This is the list of extended ed commands that Xio unearthed |
| 6 | somewhere, thanks! |
| 7 | |
| 8 | a) never use 1,$p to print out an editfile, because you will |
| 9 | be thrown out 'cause of too much text transfereed to you. |
| 10 | |
| 11 | b) $: jump to end of file. |
| 12 | |
| 13 | c) ?anything? and ?? : search from bottom to up. (like '/' |
| 14 | from beginning to end of file. (also with substitutions, |
| 15 | try out..) |
| 16 | |
| 17 | d) ( g/xxx/p search global xxx and print corresponding lines, |
| 18 | /xxx/s/new/old/p : search xxx, substitute new to old in this |
| 19 | line and print out. (try this concatenations with other |
| 20 | commands) |
| 21 | |
| 22 | e) 1,nmx ( see ed5 ) , but also: 1,ntx : don't move the lines, |
| 23 | but make a copy of them. |
| 24 | |
| 25 | f) x,y w name : save lines x to y to file name (if you don't |
| 26 | know the line numbers : '=' current line number) |
| 27 | |
| 28 | g) s/$/text/p : append text to the end of current LINE and |
| 29 | print line |
| 30 | |
| 31 | h) s/^/text/p : insert text at beginning og current LINE and |
| 32 | print line |