I have a bunch of rows that I would like to split into two columns, and get data from each column. The data looks something like this:
current_well.well_number
current_well.well_name
current_well.well_type_code
well_location.section
well_location.range
Essentially, I would like to split a row based on a period, turn the data into two columns, and then grab the data for each column. I know this can be done in Excel, but I'm really interested in solving VI for this problem. I know that
%s/\./
will format a string with empty space. But as soon as I have data that looks like this:
current_well well_number
current_well well_name
current_well well_type_code
well_location section
well_location range
How do I get all the values for each column so that I can paste it into another application?
source
share