Delete multiple lines in Linux style Vi Editor
We often have situations were we need to modify a file using vi on Unix style file system and delete multiple lines. Here are some details and examples on how to do it.
Syntax:
xdd
dd is the command to delete a complete row. x in the number of lines to be deleted.
Examples:
delete 2 lines
2dd
delete 10 lines
10dd
Syntax:
xdd
dd is the command to delete a complete row. x in the number of lines to be deleted.
Examples:
delete 2 lines
2dd
delete 10 lines
10dd
Comments
Post a Comment