Name

v

Synopsis

[address] v/pattern/[command]

Execute command on all lines not containing pattern. If command is not specified, print all such lines. v is equivalent to g!. See global.

Example

:v/#include/d        Delete all lines except "#include" lines

Get Unix in a Nutshell, 4th 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.