Name

v

Synopsis

[address] v/ pattern /[commands]

Description

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

Example

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

Get Linux in a Nutshell, Third 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.