If you're using vim, this is a simple macro. If you're not sure if you're using vim, then in command mode, type qq and check that you see recording in the status line at the bottom. If so, then you can use this macro.
Beginning on line 1, record the macro with: qqj0wcwCA[Esc]jq
This will edit the 2nd line and leave you on the 3rd line, and now you have the macro in register q
. Type 100@q to execute the command in register q
100 times.
Command details:
- Begin on Line 1
- qq - this begins recording a macro, you'll see recording in the status line at the bottom.
- j - moves to the next (alternate) line.
- 0 - moves to the beginning of the line.
- w - jumps to the next word (2nd column)
- cwCA - changes this word to CA.
- Esc key - leave edit mode.
- j - moves to the next line.
- q - this stops recording the macro.