Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- EDLIN - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

    Delete Lines command

    Purpose:  Deletes a specified range of lines.

    Format:   [line][,line]D

    Remarks:  The line following the deleted range becomes the current line,
              even if the deleted range includes the last line in memory.
              The current line and any following lines are renumbered.

              If you omit the first parameter, as in:

              ,lineD

              deletion starts with the current line and ends with the line
              specified by the second parameter. The beginning comma is re-
              quired to indicate the omitted first parameter.

              If you omit the second parameter, as in:

              lineD   or   line,D

              only the one specified line is deleted. If you omit both para-
              meters, as in:

              D

              only the current line is deleted, and the line that follows
              becomes the current line.

Example:      Assume that you want to edit the following file. The current
              line is line 22.

               1: This is a sample file used to demonstrate
               2: line deletion and dynamic
               3: line number generation.
               .               .
               .               .
              20: See what happens to the lines
              21: and line numbers when lines are
              22:*deleted.
              23: See how easy this is to use.

              If you want to delete a range of lines, from 3-20, enter:

              3,20D

              The result is:

              1: This is a sample file used to demonstrate
              2: line deletion and dynamic
              3:*and line numbers when lines are
              4: deleted.
              5: See how easy this is to use.

              Lines 3-20 are deleted from the file. Lines 21-23 are renum-
              bered to 3-5. Line 3 becomes the current line. If you want to
              delete the current and the following line, enter:

              ,4D

              The result is:

              1: This is a sample file used to demonstrate
              2: line deletion and dynamic
              3:*See how easy this is to use.

              Lines 3 and 4 are deleted from the file. Line 5 is renumbered
              to 3. Line 3 is still the current line, but now it has a dif-
              ferent text.

              If you want to delete a single line, say line 2, enter:

              2D

              The result is:

              1: This is a sample file used to demonstrate
              2:*See how easy this is to use.

              Line 2 is deleted. Line 3 is renumbered to 2. The new line 2
              becomes the current line. If you want to delete only the cur-
              rent line, enter:

              D

              The result is:

              1:*This is a sample file used to demonstrate

              The current line, line 2, is deleted. The new line 1 becomes
              the current line.

See Also: line Common

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson