home *** CD-ROM | disk | FTP | other *** search
/ The Don Maslin Archive / maslin_archive.zip / AARDVARK_Tape_Backups / maslin_c_d_3oct95 / ddrive / sydex / sanyo / helpdex.td0 / EDLIN.HDX < prev    next >
Text File  |  1990-02-15  |  19KB  |  521 lines

  1. 80/F0/07/F0/F0/F0/07
  2. MS-DOS EDLIN Text Editor
  3. Index
  4. 12
  5.              15 February 1990
  6.  
  7. SYNTAX     Understanding the syntax.      APPENDIX
  8. KEYS       Editing and function keys.     APPENDIX
  9. CREDITS    References and trademarks.     HELP
  10. -----------------------------------------
  11. EDLIN      Running the MS-DOS editor.
  12. Append     Add lines from file to buffer.
  13. Copy       Copy range of lines.
  14. Delete     Delete range of lines.
  15. Edit       Edit line of text.
  16. End        Save to diskette and quit.
  17. Insert     Insert lines.
  18. List       List range of lines.
  19. Move       Move range of lines.
  20. Page       List range of lines.
  21. Quit       Quit w/o saving to diskette.
  22. Replace    Replace string w/new string.
  23. Search     Search for string.
  24. Transfer   Merge file from diskette.
  25. Write      Write lines to output file.
  26. !DOCUMENT
  27. !EDLIN
  28. EDLIN:  Running the MS-DOS editor.
  29.  
  30. The text editor, EDLIN, supplied with MS-DOS is a simple text editor which
  31. can be used to:
  32.  
  33.           1.  create and save new ASCII text files,
  34.  
  35.           2.  update existing ASCII text files and save the updated
  36.               and original files,
  37.  
  38.           3.  copy, delete, display, edit, insert, and move lines,
  39.  
  40. and       4.  search for, delete, and replace text strings within a
  41.               specified range of lines.
  42.  
  43. The text created or edited with EDLIN is divided into lines varying length.
  44. The length of any line cannot exceed 253 characters.  Line numbers are
  45. displayed by EDLIN during the editing session but are not a part of the file
  46. as it is saved.
  47.  
  48. SYNTAX:
  49.  
  50.   EDLIN [/B] [filespec]
  51.  
  52.   where the /B switch tells EDLIN to ignore CONTROL Z characters and
  53.   display the entire contents of the file.
  54.  
  55. Enter the EDLIN command conforming to the syntax above at the MS-DOS prompt.
  56. When ready, EDLIN will display the message "End of input file" on the console
  57. display device followed on the next line by the EDLIN prompt, the asterisk (*).
  58. If the file specified does not exist it will be created and EDLIN will instead
  59. display the message "New file" followed on the next line by the EDLIN prompt.
  60.  
  61. EXAMPLE:
  62.  
  63.   EDLIN AUTOEXEC.BAT     Runs EDLIN and loads the file AUTOEXEC.BAT.
  64.  
  65. Use the editing commands of EDLIN to add or modify the text of the file.  To
  66. quit EDLIN use the E (End) command to save the file to disk and quit, or the
  67. Q (Quit) command to quit EDLIN without saving the file.
  68.  
  69. EDLIN commands consist of a letter, which may be entered either as upper or
  70. lower case, preceeded and/or followed by one or more parameters.  Any of the
  71. commands of EDLIN may be aborted at any time by using the MS-DOS function key
  72. <CONTROL C>.  All of the MS-DOS editing and function keys are active in the
  73. EDLIN environment (see KEYS in the index).  When a syntax error has occured in
  74. an EDLIN command EDLIN will display the message "Entry error" on the console
  75. display device followed on the next line by EDLIN prompt.
  76.  
  77. The commands of EDLIN are summarized in Table 1 below.
  78.  
  79.  
  80.                         --------------------------------
  81.                          Command  |  Function
  82.                         ================================
  83.                                   |
  84.                              <n>  |  Edit line n
  85.                                A  |  Append lines
  86.                                C  |  Copy lines
  87.                                D  |  Delete lines
  88.                                E  |  End session
  89.                                I  |  Insert lines
  90.                                L  |  List lines
  91.                                M  |  Move lines
  92.                                P  |  Page lines
  93.                                Q  |  Quit session
  94.                                R  |  Replace string
  95.                                S  |  Search for string
  96.                                T  |  Transfer file
  97.                                W  |  Write lines
  98.                         --------------------------------
  99.  
  100.                           Table 1.  Commands of EDLIN.
  101.  
  102.  
  103. The following list contains information generally applicable to the editing
  104. commands of EDLIN.
  105.  
  106.           1.  The current line is the line with the asterisk following
  107.               the line number.
  108.  
  109.           2.  You can reference line numbers relative to the current
  110.               line by using a minus (-) od plus (+) sign with a number
  111.               to indicate lines before or after the current line, e.g.,
  112.  
  113.                                      -5,+5L
  114.  
  115.               which will list 5 lines before the current line, the
  116.               current line, and 5 lines after the current line.
  117.  
  118.           3.  The pound (#) character may be used in place of a number
  119.               to indicate the last line of the file, e.g.,
  120.  
  121.                                       1,#L
  122.  
  123.               displays on the console the file from the first line
  124.               through the last line of the file.
  125.  
  126.           4.  Multiple commands may be issued on one command line.
  127.               If you issue an Edit command to edit a single line using
  128.               a line number, a semicolon (;) must separate commands on
  129.               the line, e.g.,
  130.  
  131.                                     25;-5,+5L
  132.  
  133.               displays line 25 for editing, then displays lines 20
  134.               through 30 after line 25 has been edited.  Otherwise,
  135.               one command may follow another without the use of the
  136.               semicolon.  In the case of Search or Replace command
  137.               the string of text is ended by <CTRL>+<Z> instead of
  138.               <ENTER> if another command is to follow, e.g.,
  139.  
  140.                                   Sapple^Z-5,+5L
  141.  
  142.               (^Z is the CONTROL Z character) searches for the first
  143.               occurance of the string apple after the current line
  144.               and displays the line in which the string occurs, making
  145.               it the current line, and then displays 5 lines before
  146.               the new current line, the new current line, and 5 lines
  147.               after the new current line.
  148.  
  149.           5.  Commands can be typed with or without a space between
  150.               the line number and the command, e.g., 5D is the same
  151.               as 5 D.
  152.  
  153.           6.  A control character can be inserted into a string of
  154.               text by using the EDLIN quote character, CONTROL V,
  155.               before it.  CONTROL V tells EDLIN to recognize the next
  156.               upper case letter typed as a control character.  It is
  157.               possible to insert CONTROL V into the string of text by
  158.               typing following the CONTROL V character with V.
  159.  
  160.           7.  The CONTROL Z character is interpreted by EDLIN to be
  161.               the end of file character.  If there are CONTROL Z
  162.               characters elsewhere in a file, use the /B switch to
  163.               tell EDLIN to ignore the CONTROL Z characters and
  164.               display the entire contents of the file.
  165.  
  166. For complete information about each command please return to the index and
  167. select the desired command.
  168. !APPEND
  169. COMMAND:  Append
  170.  
  171. PURPOSE:  Read the specified number of lines from disk file to file being
  172.           edited in memory.
  173.  
  174. SYNTAX:
  175.  
  176.   [n]A    where n is the number of lines to be read.
  177.  
  178. EXAMPLE:
  179.  
  180.   [100]A  reads next 100 lines of file on disk.
  181.  
  182. The append command is only used if the file being editied is too large to fit
  183. in available memory.  EDLIN reads lines from the disk file into memory until
  184. the available memory is 75% full.  Use the write command to write the editied
  185. lines back to disk before using the append command.  The append command has no
  186. effect if the available memory is already 75% full.
  187.  
  188. If the number of lines is not specified, the append command will cause lines to
  189. be read from the disk file until the available memory is 75% full or the end of
  190. file is reached.  The message "End of input file" will be displayed when the
  191. last line of the file has been read.
  192. !COPY
  193. COMMAND:  Copy
  194.  
  195. PURPOSE:  Copy a range of lines and insert at the specified position.
  196.  
  197. SYNTAX:
  198.  
  199.   [line1],[line2],<line3>[,n]C
  200.  
  201.   where   line1 is the beginning line number of the range of lines to be
  202.                 copied,
  203.  
  204.           line2 is the ending line number of the range of lines to be
  205.                 copied,
  206.  
  207.           line3 is the position where the lines being copied are to be
  208.                 inserted, and
  209.  
  210.           n     is the number of times the range of lines are to be
  211.                 repeated in the copy.
  212.  
  213.   If either line1 or line2 is omitted, the current line is assumed.  If
  214.   both line1 and line2 are omitted only the current line is copied.  If ,n
  215.   is omitted, the range of lines is copied once only.  The range of lines
  216.   specified by line1 and line2 must not overlap the position line3 to which
  217.   the range of lines are to be copied.  The lines of the file are renumbered
  218.   automatically after copy command is executed.  The line at the position
  219.   specified by line3 becomes the current line.
  220.  
  221. EXAMPLE:
  222.  
  223.   3,5,1C  copies lines 3 through 5 and inserts the copy at line 1.
  224. !DELETE
  225. COMMAND:  Delete
  226.  
  227. PURPOSE:  Delete a range of lines.
  228.  
  229. SYNTAX:
  230.  
  231.   [line1][,line2]D
  232.  
  233.   where   line1 is the beginning line number of the range of lines to be
  234.                 deleted,
  235.  
  236.           line2 is the ending line number of the range of lines to be
  237.                 deleted,
  238.  
  239.   If either line1 or ,line2 is omitted, the current line is assumed.  If
  240.   both line1 and ,line2 are omitted, the current line is deleted.  The
  241.   lines of the file are renumbered automatically after copy command is
  242.   executed.  The line following the last deleted line becomes the current
  243.   line.
  244.  
  245. EXAMPLE:
  246.  
  247.   3,5,D  deletes lines 3 through 5.
  248.  
  249.   4D     deletes line 4.
  250. !EDIT
  251. COMMAND:  Edit
  252.  
  253. PURPOSE:  Display a line of text for editing.
  254.  
  255. SYNTAX:
  256.  
  257.   [line]     where line is the number of the line to be edited.
  258.  
  259.   When the line number is enterd, EDLIN will display the line number
  260.   followed by the line of text.  On the line below, EDLIN reprints the line
  261.   number and the line is ready for editing.  The displayed line of text
  262.   serves as the template for editing.  Use the function keys to copy all or
  263.   part of the text of the template and to insert or delete text as desired.
  264.   When the return key is pressed any text beyond the cursor position will be
  265.   deleted.
  266.  
  267.   To edit the current line, enter the period in place of the line number.
  268.   To edit the line following the current line or next line omit the line
  269.   number and press the ENTER key.
  270.  
  271.   Use the special editing keys of MS-DOS to edit the line.  Refer to the
  272.   index for information regarding MS-DOS editing and function keys.
  273. !END
  274. COMMAND:  End
  275.  
  276. PURPOSE:  End the editing session by saving the editied file and return to
  277.           MS-DOS.
  278.  
  279. SYNTAX:
  280.  
  281.   E
  282.  
  283. EXAMPLE:
  284.  
  285.   E       ends the editing session, saves the edited file, and quits EDLIN.
  286.  
  287.   If the file existed on disk when the session was started, a backup file,
  288.   filename.BAK, will be created.  If the disk does not have enough space to
  289.   save the edited file, the part or all of the edited file will be lost.
  290. !INSERT
  291. COMMAND:  Insert
  292.  
  293. PURPOSE:  Insert a new line at the position specified.
  294.  
  295. SYNTAX:
  296.  
  297.   [line]I    where line is the position at which the line is to be inserted.
  298.  
  299.   If line is omitted, the current line is assumed.  The line following the
  300.   last inserted line becomes the current line.
  301. !LIST
  302. COMMAND:  List
  303.  
  304. PURPOSE:  Display a range of lines.
  305.  
  306. SYNTAX:
  307.  
  308.   [line1][,line2]L
  309.  
  310.   where   line1 is the beginning line number of the range of lines to be
  311.                 displayed,
  312.  
  313.           line2 is the ending line number of the range of lines to be
  314.                 displayed,
  315.  
  316.   If line1 is omitted, the range of lines begins 11 lines before the current
  317.   line.  If ,line2 is omitted, the range will be 23 lines beginning with line1.
  318.   If both line1 and ,line2 are omitted, the range is 23 lines beginning 11
  319.   lines before the current line.  The List command differed from the Page
  320.   command in that the List command has no effect on the number of the current
  321.   line.
  322.  
  323. EXAMPLE:
  324.  
  325.   40L     displays 23 lines beginning with line 40.
  326. !MOVE
  327. COMMAND:  Move
  328.  
  329. PURPOSE:  Move a range of lines and insert at a specified position.
  330.  
  331. SYNTAX:
  332.  
  333.   [line1],[line2],<line3>M
  334.  
  335.   where   line1 is the beginning line number of the range of lines to be
  336.                 moved,
  337.  
  338.           line2 is the ending line number of the range of lines to be
  339.                 moved,
  340.  
  341.           line3 is the position where the lines being moved are to be
  342.                 inserted, and
  343.  
  344.   If either line1 or line2 is omitted, the current line is assumed.  If both
  345.   line1 and ,line2 are omitted, only the current line is moved.  The range
  346.   of lines specified by line1 and line2 must not overlap the position, line3,
  347.   to which the range of lines are to be moved.  The lines of the file are
  348.   renumbered automatically after move command is executed.  The line at the
  349.   position specified by line3 becomes the current line.
  350.  
  351. EXAMPLE:
  352.  
  353.   3,5,1M  moves lines 3 through 5 and inserts them at line 1.
  354. !PAGE
  355. COMMAND:  Page
  356.  
  357. PURPOSE:  Display a range of lines.
  358.  
  359. SYNTAX:
  360.  
  361.   [line1][,line2]P
  362.  
  363.   where   line1 is the beginning line number of the range of lines to be
  364.                 displayed, and
  365.  
  366.           line2 is the ending line number of the range of lines to be
  367.                 displayed.
  368.  
  369.   If line1 is omitted, the range of lines begins with the line following the
  370.   current line.  If ,line2 is omitted, the range will be 23 lines beginning
  371.   with line1.  If both line1 and ,line2 are omitted, the range is 23 lines
  372.   beginning with the line following the current line.  The Page command differs
  373.   from the List command in that with the Page command the last line displayed
  374.   becomes the current line.
  375.  
  376. EXAMPLE:
  377.  
  378.   P       displays 23 lines beginning with the line following the current
  379.           line.
  380. !QUIT
  381. COMMAND:  Quit
  382.  
  383. PURPOSE:  Quit the editing session without saving the edited file and return
  384.           to MS-DOS.
  385.  
  386. SYNTAX:
  387.  
  388.   Q
  389.  
  390. EXAMPLE:
  391.  
  392.   Q       quits the editing session and returns to MS-DOS without saving the
  393.           edited file.
  394.  
  395. If the file existed on disk when the session was started, the same file will
  396. exist on the disk upon quitting EDLIN.
  397. !REPLACE
  398. COMMAND:  Replace
  399.  
  400. PURPOSE:  Search for a specified string of text in a specified range of lines
  401.           and replace each occurance with a new string of text.
  402.  
  403. SYNTAX:
  404.  
  405.   [line1][,line2][?]R<string1><CONTROL-Z><string2>
  406.  
  407.   where   line1 is the beginning line number of the range of lines in which
  408.                 the string of text is to be replaced,
  409.  
  410.           line2 is the ending line number of the range of lines in which the
  411.                 the string of text is to be replaced,
  412.  
  413.           ? causes the line in which string1 occurs to be displayed with the
  414.                 occurance of string1 replaced by string2 and the user to be
  415.                 prompted with the O.K.? prompt for a Y(es) or N(o) response
  416.                 to replace or not to replace string1 with string2 at that
  417.                 occurance,
  418.  
  419.           string1 is the string of text to be searched for and replaced,
  420.  
  421.           CONTROL-Z is the charcater generated by pressing and holding the CTRL
  422.                 key while the Z key is pressed, and
  423.  
  424.           string2 is the string of text with which the occurance of string1
  425.                 is to be replaced by.
  426.  
  427.   If either line1 or line2 is omitted, the current line is assumed.  If both
  428.   line1 and ,line2 are omitted, only the current line is searched.  If string1
  429.   occurs more than once in a line, each occurance of string1 will be replaced
  430.   by string2.  Response to the O.K.? prompt by pressing a key other than the
  431.   Y key will cause the occurance of the string of text to be left unchanged.
  432.   If the specified string of text is not found, the message "Not found" will
  433.   be displayed.
  434.  
  435. EXAMPLE:
  436.  
  437.   3,5Rapple<CONTROL-Z>orange
  438.  
  439.           searches lines 3, 4, and 5 for the string apple and replaces apple
  440.           with orange at each occurance of the string apple.
  441. !SEARCH
  442. COMMAND:  Search
  443.  
  444. PURPOSE:  Search for a specified string of text in a specified range of lines.
  445.  
  446. SYNTAX:
  447.  
  448.   [line1][,line2][?]S<string>
  449.  
  450.   where   line1 is the beginning line number of the range of lines in which
  451.                 the string of text is to be searched for,
  452.  
  453.           line2 is the ending line number of the range of lines in which the
  454.                 the string of text is to be searched for,
  455.  
  456.           ? causes the line in which string1 occurs to be displayed and the
  457.                 user to be prompted with the O.K.? prompt for a Y(es) or N(o)
  458.                 response to terminate the search and make the displayed line
  459.                 the current line, and
  460.  
  461.           string is the string of text to be searched for.
  462.  
  463.   If either line1 is omitted, the line after the current line is assumed.
  464.   If line2 is ommited the last line of the file is assumed.  If the string
  465.   is omitted the last string is assumed.  If the last string is nul the search
  466.   will be terminated immediately.  If the ? option is not used, the first line
  467.   in which the specified string of text occurs will be displayed, the search
  468.   will be terminated, and the displayed line will become the current line.
  469.   Response to the O.K.? prompt by pressing a key other than the Y key will
  470.   cause the occurance of the string of text to be left unchanged.  If the
  471.   specified string of text is not found, the message "Not found" will be
  472.   displayed.
  473.  
  474. EXAMPLE:
  475.  
  476.   3,5Sapple
  477.  
  478.           searches lines 3, 4, and 5 for the string apple, displays the
  479.           first line in which the string apple appears, and makes the
  480.           displayed line the current line.
  481. !TRANSFER
  482. COMMAND:  Transfer
  483.  
  484. PURPOSE:  Merge a specified filefrom disk into the file currently being edited.
  485.  
  486. SYNTAX:
  487.  
  488.   [line]T<filespec>
  489.  
  490.   where   line is the number of the line at which position the contents of
  491.                 the specified file is to be inserted, and
  492.  
  493.           filespec specifies the file to be merged.
  494.  
  495.   If line is omitted, the current line is assumed.  The previous line at
  496.   position line and lines following are renumbered to follow the lines of
  497.   the merged file.
  498.  
  499. EXAMPLE:
  500.  
  501.   5TPEAR.TXT   inserts the contents of the file PEAR.TXT at line 5 of the
  502.                file currently bing edited.
  503. !WRITE
  504. COMMAND:  Write
  505.  
  506. PURPOSE:  Write a specified number of lines, beginning with line 1, from the
  507.           file being edited in memory to the disk file.
  508.  
  509. SYNTAX:
  510.  
  511.   [n]W    where n is the number of lines to be written to the disk file.
  512.  
  513.   The number of lines written to the disk file begins with line 1.  If n is
  514.   omitted, lines will be written until available memory is 75% full and no
  515.   action will be taken if available memory is less than 75% full.
  516.  
  517. EXAMPLE:
  518.  
  519.   25W     writes the first 25 lines of the file currently being edited to the
  520.           disk file.
  521.