Hi ,
I am writing a awk script which will check the values in field 1 and field 2 based on these values the awk has to update field 4.
Source data
ABC,XYZ,1,2,3,XXXXXXXXXXXXXX,1,2,3
ABC,123,1,2,3,XXXXXXXXXXXXXXX,1,2,3
ABC,DEF,1,2,3,XXXXXXXXXXXXXXX,1,2,3
ABC,123,1,2,3,XXXXXXXXXXXXXXX,1,2,3
target data
ABC,XYZ,1,2,3,This is a valid record,1,2,3
ABC,123,1,2,3,XXXXXXXXXXXXXXX,1,2,3
ABC,DEF,1,2,3,This is a valid record,1,2,3
ABC,123,1,2,3,XXXXXXXXXXXXXXX,1,2,3
pls tell me how can i compare two times in awk example.
I tried writing the below awk ..but it's wrong and not giving me the required output
awk '{$1=='ABC" ;$2=="XYZ" } print $6=='This is a valid record'
END
where I am doing wrong in the above script.
Regards,
Deepti