Converting group lines from format A to Format B
Convert from one format to another
Start file
ABCDEFGHIJKL 00100 C N12345678W1234567891234 GND 99999MMY LITTLE TEST 000000000
ABCDEFGHIJKL 00100 H N12345678W123456789 GND 99999MANOTHER LITTLE TEST 000000000
ABCDEFGHIJKL 00200 L N12345678W123456789N12345678W12345678912341234 000000000
ABCDEFGHIJKL 00300 G N12345678W123456789
End file
0010|C|||N12345678|W123456789|123.4
0010|H|N12345678|W123456789||
0020|L|N12345678|W123456789|N12345678|W123456789|123.4|123.4
0030|G|N12345678|W123456789||
View Diff
1,4c1,4
< ABCDEFGHIJKL 00100 C N12345678W1234567891234 GND 99999MMY LITTLE TEST 000000000
< ABCDEFGHIJKL 00100 H N12345678W123456789 GND 99999MANOTHER LITTLE TEST 000000000
< ABCDEFGHIJKL 00200 L N12345678W123456789N12345678W12345678912341234 000000000
< ABCDEFGHIJKL 00300 G N12345678W123456789
---
> 0010|C|||N12345678|W123456789|123.4
> 0010|H|N12345678|W123456789||
> 0020|L|N12345678|W123456789|N12345678|W123456789|123.4|123.4
> 0030|G|N12345678|W123456789||
\ No newline at end of file
Solutions
The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!
Check out these helpful resources to improve your Vim skills... Game on.
Unlock 11 remaining solutions by signing in and submitting your own entry
#12 slicklash / @slicklash - Score: 87 - 08/23/18 @ 13:54
<C-Q>Lt0xe<C-Q>LtGc|<Esc>ll<C-Q>3jr|<Esc>i||<Esc>lldwqqf8a|<Esc>f9.q<CR>@q<CR>@@@@f3a.<Esc>la|<Esc>f3a.<Esc>llD<CR>@@A|<Esc>2ki|<Esc>lDkf Di.<Esc>ZZ
0 comments