I have been familiarising myself with awk but finding it tough going.
I have a | delimited text file in this format
S334387|165 WHEELER PL|3|3|0|0|4||2.0|||||305|||||||||||||||DISHWSHR|DISPOSAL|MICROWV|RANGE|REFRIG|WSHRDRYR||||||||0.0|COPPR|1353.0|CAMAINT|COMTAXES|HEAT cont...
S336759|105 Beeler PL|3|3|0|0|4||4.0|||||148|||||||||||||||DISHWSHR|DISPOSAL|MICROWV|RANGE|RANGEHD|REFRIG|||||||||COPPR|1703.0|CABLETV|CAMAINT|INSURNCE cont...
There are 150 fields in each row, some of which are empty. I need to rewrite each line grouping together certain columns to be just one column (Columns 15-28, 29-41, 45-60) and there are many other groupings i need to do in each row. However, its the same groupings to be done in each row of the text file.
e.g |0.5||DISHWSHR|DISPOSAL|MICROWV|RANGE| would become |0.5||DISHWSHR,DISPOSAL,MICROWV,RANGE|
My question has been sortof answered in this thread, but Ive had trouble tweaking the solution for what i want to do.
Many Thanks!!!
I have a | delimited text file in this format
S334387|165 WHEELER PL|3|3|0|0|4||2.0|||||305|||||||||||||||DISHWSHR|DISPOSAL|MICROWV|RANGE|REFRIG|WSHRDRYR||||||||0.0|COPPR|1353.0|CAMAINT|COMTAXES|HEAT cont...
S336759|105 Beeler PL|3|3|0|0|4||4.0|||||148|||||||||||||||DISHWSHR|DISPOSAL|MICROWV|RANGE|RANGEHD|REFRIG|||||||||COPPR|1703.0|CABLETV|CAMAINT|INSURNCE cont...
There are 150 fields in each row, some of which are empty. I need to rewrite each line grouping together certain columns to be just one column (Columns 15-28, 29-41, 45-60) and there are many other groupings i need to do in each row. However, its the same groupings to be done in each row of the text file.
e.g |0.5||DISHWSHR|DISPOSAL|MICROWV|RANGE| would become |0.5||DISHWSHR,DISPOSAL,MICROWV,RANGE|
My question has been sortof answered in this thread, but Ive had trouble tweaking the solution for what i want to do.
Many Thanks!!!