Delete Command [D]

Qedit 5.7 for HP-UX

Home Previous Next


Delete Command [D]

Deletes lines from the workfile.

DELETE [ rangelist ]

(Q=no display, J=verify)

(Default: rangelist = *)

Delete prints each line in rangelist, with an underline character after the line number, as it deletes them, unless you use DQ.

Notes

If you do Delete All, you must answer "Y" to a verifying question before the lines will be deleted. This also applies if you Set Check Delete is ON and you delete more than 5 lines.

If you delete the wrong lines, you can cancel the Delete by striking Control-Y. However, you must use Control-Y before you press Return on the next command line. Qedit responds by printing "Undeleted" or "Canceled". Once you have typed in the next command line and press Return, your chance to recover using Control-Y is gone and the previous Delete command is final. You can still undo the deletion using Undo.

Delete All resets the Set Keep Name (default for Keep command) so that a later Keep command will not wipe out the wrong file by mistake.

Confirm Each Deletion

Use DJ to give yourself approval over each delete before it is carried out. With DJ, Qedit displays the line (even if the Quiet option is used) and asks you for a Yes, No, or Stop answer.

Answer No or Return to keep the line.

Answer Yes to delete the current line. Unlike the basic Delete operation where lines are removed with the next command, lines confirmed in DJ are deleted immediately. They can be recovered with an Undo command.

Answer Stop if you wish to stop the delete process. When you use Stop, lines that have been deleted are not recovered automatically. Use Undo to recover them.

Examples

/delete 5/6           {remove lines 5 and 6 from file}
    5    _this is line 5
    6    _and this is line 6!
/dq 2 10/49           {delete lines 2 and 10/49}
/delete "."(1/1)      {delete lines with "." in column 1}
                      {Implied rangelist is ALL}
/del "."(1/1 nomatch) {delete lines without "."}
/d "~"(pattern)       {delete all blank lines}
/dj 3/66
    3    this is line 3
Delete it (Y,N or Stop) [No]:
    4    this is line 4
Delete it (Y,N or Stop) [No]:Y
    5    this is line 5
Delete it (Y,N or Stop) [No]:n
    6    this is line 6
Delete it (Y,N or Stop) [No]:S
1 line Deleted!


Home Previous Next