vim – delete comments and empty lines

Hi, today in english because .. more people can read this in the world 😉

How to delete comments and empty lines in a config-file in linux?
No Problem, do this in vi/vim:

:g/^\#/d

This deletes lines beginning with #

:g/^$/d

and this will delete lines beginning with empty space.

Now try this and have much fun with short config-files 😉

Have a nice day

(Visited 10 times, 1 visits today)

Ãœber den Autor

Tom
-- PKI- und Verschlüsselungsexperte -- WLAN- und LAN-Spezialist -- IT- und Film-Nerd --

   

Einen Kommentar hinterlassen

Deine E-Mail-Adresse wird nicht veröffentlicht.


*