Hi Radoulov,
How to restrict the gsub to start from a certain position,
Can we use the substr in conjunction with gsub,
nawk 'NR==FNR{ gsub(/[ \(\)-]/,"");x[$0];next}
{gsub(/[ \(\-]/,"")}!($1 in x)' file11.csv file22.csv
Is substituting all the "-" to spaces as a result the
If the first column has the "-" it is overidden.
Is displays 1023,JONES D,7037891249 from the example.
FILE1:
1-023,SMITH JAMES, (203) 789-1249
10-23,HARRY POTTER, (213) 789-1249
1-023,JONES D, (903) 789-1249
FILE2:
1-023,SMITH JAMES,2037891249
10-23,HARRY POTTER, 2137891249
1-023,JONES D,7037891249
Output should be:
1-023,JONES D,7037891249
As the phone number is different.
Thanks a lot for your help
S