Hi i have a file delimited with ","as below and i need to handle scenario like col1,col2 fields have special character '|', i need count of special character value column wise as given in col3 and col4. pls help me to reslove this.
Source file
name,col1,col2,col3,col4
one,2,3
two,2|3,2|3
two,2|3,2|3
five,2|3|4|9|2,2|3|4|9|2
five,2|3|4|9|2,2|3|4|9|2
five,2|3|4|9|2,2|3|4|9|2
five,2|3|4|9|2,2|3|4|9|2
five,2|3|4|9|2,2|3|4|9|2
Target output
name,col1,col2,col3,col4
one,2,3,0,0
two,2|3,2|3,1,1
two,2|3,2|3,1,1
five,2|3|4|9|2,2|3|4|9|2,4,4
five,2|3|4|9|2,2|3|4|9|2,4,4
five,2|3|4|9|2,2|3|4|9|2,4,4
five,2|3|4|9|2,2|3|4|9|2,4,4
five,2|3|4|9|2,2|3|4|9|2,4,4