Name
delete
Synopsis
[address
] d [register
]
Delete the lines included in address. If register is specified, save or append the text to the named register. Register names are the lowercase letters a-z. Uppercase names append text to the corresponding register.
Examples
:/Part I/,/Part II/-1d
Delete to line above "Part II":/main/+d
Delete line below "main":.,$d x
Delete from this line to last line into register x
Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.