Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
vi: remove every second line (Read 1068 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
vi: remove every second line
05.07.14 at 09:23:00
 
vi: remove every second line
 
In vi, a macro can be used to remove every second line in the file. The following commands need to be used:
 
qq
arrow down
dd
q
1000@q
 
Explanation:
qq starts recording macro q
arrow down, skips to the next line that is to be deleted
dd deletes the line
q stops the macro recorder
1000@q runs the macro 1000 times
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1