I have a text file of X ips and X files that looks like:
ip1
ip2
ip3
some_dir/file1
some_dir/file2
some_dir/file3
I'd like to combine the lines into a csv format, like:
ip1,some_dir/file1
ip2,some_dir/file2
ip3,some_dir/file3
Any suggestions on how this could be on? Thanks!
i
ofip1
. Then use the solution as written except change the space-dash-space to a comma.mt<C-V>}mb<BS>$A,<Esc>gvd'bjPkd't
. While in Normal mode you'll want to type those characters literally except for the parts of the form<X>
. Those are, respectively, Ctrl-V, Backspace and Escape.