![]() |
DOS Utility Edlin Explained |
The information in this document applies to:
WordPerfect® 5.1 for DOS
Problem
Solutions: Edlin is a DOS text file editor that is included in the DOS package. The advantage of using Edlin to create or edit text files, is that it is memory resident on the DOS diskette and does not require additional memory to use. Edlin is command driven, not menu driven, so the commands must be known by the user. Edlin is a line editor not a page editor. This means that the commands are only executed on the specified line or lines, not on a page at a time, like a word processor. The only Edlin commands that can affect more than one line at a time are list, write, append, and copy. Edlin commands are one letter commands that are entered at the Edlin prompt of *_. The following is a list of the Edlin commands: A Appends lines from the disk file to the file in resident memory. C Copies the specified lines to a designated position. D Deletes the current line or the line specified. - Edits the current line. E Updates and exits the file. I Inserts lines. L Lists specified lines to the screen. M Moves the specified lines to a designated location. P Displays a whole screen of lines, beginning at a specified line. Q Aborts and exits Edlin. R Acts as a global search and replace. S Searches the document for a text string. T Merges two files together. W Writes lines from the edited file to disk. To invoke Edlin type, edlin Edlin will load a file into RAM until the entire file is loaded into memory, or until 75% of the available RAM is used. If there is not enough RAM to load the entire file, some edited lines will have to be written to disk with the W (write) command, and the rest of the disk file appended to the RAM file with the A (append) command. Some basic rules of Edlin are: 1. Most commands are entered using one letter. The line number must be entered followed by the command for the command to affect the specified line. 2. Edlin commands are not case specific. They can be entered in upper or lower case, or a combination of both. 3. Line numbers range from 1 to 65529. Entering a line number greater than 65529, or the largest line number in memory, will cause Edlin to add a new line after the last line in the file. Line numbers have to be separated by commas in range commands that specify more than one line. 4. Using the # (pound) sign to specify the line number causes Edlin to create a new line after the last line in the file. 5. A period specifies the current line. 6. You can specify a range relative to the current line by using positive and negative numbers. For example, *_6,+15,38C would copy 6 lines before the current line, and 15 lines after the current line would be copied to line 38. If I was on line 10 when I entered this command, lines 4 through 25 would be copied to line 38 of the file. 7. To stack commands for one line, separate the commands by a ; (semi- colon). 8. If you need to enter a control character in your file, first press Ctrl-V, then the character in upper case. 9. If you are displaying a lot of data and need to pause the screen, press the break key (Ctrl-Scroll Lock). Pressing the break key again will restart the scroll. COMMAND FORMATS Append lines *25A This command would append 25 lines from the disk file to the RAM file, provided there was enough memory available. Copy lines *1,5,10,2C There are three parts to this command. 1,5 tells Edlin to copy lines 1 through 5, 10 refers to the line where they will be copied to, and 2 tells Edlin to perform the function two times. So you have range, line, and count separated by commas in this command. Delete lines *2,4D This command deletes lines 2 through 4. If you only wanted to delete one line, a command of *5D would delete line 5 only. Editing lines *_ This command puts you in the edit mode on the current line. Pressing return will put you in the edit mode on the line following the current line. If you are on the last line, pressing return will put you at the Edlin (*_) prompt following the last line of the file. Typing a 3 and return will put you at a 3:*_ prompt. You are now in the edit mode on line three. Pressing the "break key" (ESC-Enter) anywhere on the line will exit you from the edit mode and leave the line unchanged. Exiting Edlin *E This command will update the disk file and exit Edlin. Inserting lines *5I This command will put you in the insert mode on line 5, the prompt would appears as 5:*_. After entering text, press Ctrl-C to exit to a DOS prompt. Edlin has a maximum file size of 65529 lines, specifying a line number greater than 65529 would place you at an Edlin prompt immediately following the last line of text in the file. The # sign will also place you at an Edlin prompt following the last line in the file. Listing lines *6,11L This command would list lines 6 through 11 on the screen, and return you to an Edlin prompt. A command such as *-5,+5L would list the 5 lines preceding the current line, and the 5 lines after the current line. Move lines *7,9,25,M This command moves lines 7 through 9 to line 25. To move one line, enter one number then the line you want it copied to. *2,10M would move line 2 to line 10. Display a screen *25P This command would display 23 lines on the screen beginning with line 25. The current line becomes the last line listed on the screen. Just entering a *P would list the 23 lines immediately following the current line. The current line then becomes the last line displayed. A range can be listed by entering a command such as *5,25P. Line 25 becomes the current line. Abort and exit *Q This will abort and exit Edlin without making any changes. Search and replace *1,23 ? RDOS^ZMS-DOS This command can be broken down into five parts. 1,23 tells Edlin to search lines 1 through 23. The ? tells Edlin to prompt you to confirm the replacement. The R tells Edlin to replace the first string with the second string. The first string is DOS and is delimited from the second string by the ^Z. The second string is MS-DOS. [line] followed by the rest of the command would tell Edlin to begin at the current line, and search and replace until the end of the document. ,[line] followed by the rest of the command, tells Edlin to begin at the line following the current line. [line1], [line2] would tell Edlin to search and replace between the specified lines. *1 RDOS^ZMS-DOS would begin at line 1, and search for DOS and replace it with MS-DOS until the end of the file. ,23 would tell Edlin to begin on the line following the current line and continue until line 23. Edlin stops at each line with the specified search string and prompts you to replace. If the line has more than one occurrence of the string, all of them will be replaced by a positive response, Edlin does not prompt for each individual occurrence on a line. Search *1, ? SBOLD The search command uses the same line and string parameters as the search and replace command. The above command would begin at line 1, and stop at every BOLD and prompt you to enter a Y or return to continue the search. *2,38SBOLD would search from lines 2 to 38 stopping at each line with BOLD in it. Merge files *5T(FILENAME) This command will merge the specified file into the RAM file at line 5. File 1 File 2 1:now is the time 1:four score and seven 2:for all good 2:years ago our 3:men to come to 3:forefathers brought 4:the aid of 4:forth on this 5:their country 5:continent a new nation. *3TFile 2 This command would merge file 2 into file 1 at line 3. 1:now is the time 2;for all good 3:four score and seven 4:years ago our 5:forefathers brought 6:forth on this 7:continent a new nation. 8:men to come to 9;the aid of 10:their country Write lines *25w This command would write the first 25 lines of the ram file to disk. The line number tells Edlin to write lines 1 through the specified number to disk. The remaining lines are renumbered beginning with line 1. |
Answer:
Details:
Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER. |