delete Command

Deletes one or more lines.

Scope: File

Syntax

Parameter

Number
The number of lines to be removed. Must be positive. The default is one.

Description

The delete command removes the current line or the current line and a number of following lines from the file. The line that follows the deleted lines, becomes the current one. If there are no following lines, line becomes the current line.

If a parser is set, the new current line (if any) is added to the pending list.

If any deleted line contains the beginning or end of a block, the block clear command is called before the delete is done.

Example

To delete the next five lines from a file, type:

delete 5 

The sixth line becomes the current one.

API Return Codes

-1 
The number specified was not a positive integer. Issue the command again using a valid positive number.
-5 
You cannot make changes to the file because the readonly parameter is set to on.

block Command