To turn on the display of line numbers in the vi editor, use the following command:
:set number
To turn off the dispaly of line numbers, use the command below:
:set nonumber
|
|
:set number
To turn off the dispaly of line numbers, use the command below:
:set nonumber
To delete all lines containing "foo" you could use the following command:
:g/foo/d
To delete all lines not containing "foo" you could use the following command:
:v/foo/d
References: