The de command deletes one or more lines from the current item, starting at the current line number position. If a string is specified, only the lines containing the string are deleted. Lines are not actually deleted until the item is filed with an f command. See x command to cancel the de.
de{#lines{/string{/start.col-end.col}}}
start.col | Specifies the beginning column ranges in which string comparisons are made. |
end.col | Specifies the ending column ranges in which string comparisons are made. |
A de command ending in a delimiter displays the lines as they are deleted. Note that the line pointer is not incremented.
Deletes the current line.
de
Deletes the current line and the next nine lines.
de10
Deletes and displays the current and next nine lines.
de10/
Deletes lines containing the string, abc, in the current and next nine lines. Any lines not containing this string are not deleted.
de10/abc
Deletes and displays the lines containing the string, abc, in column ranges 5 through 9, in the current and next nine lines. Any lines not containing this string, starting at column position 5, are not deleted.
de10/abc/5-9