I have unix file with csv format like below
col1, col2, col3, col4
abc, efg, h,i,j lmn
Need to remove "," from col3 and keep , separated values. Any help ?
>Solution :
Instead of using sed I suggest using awk for this. Since the columns are separated by one or more whitespaces, you can use the global substitution function gsub on the third column.
This replaces , (the regex /,/) with an empty string ("") in the third column ($3):
awk '{gsub(/,/,"",$3)}1' the_file