learningawk
Technical User
I have found some similar posts but not quite like my problem.
I have a data file 1 that looks like:
00001 0 000 xxxxx yyyy
...numerous records of data
00020 0 000 xxxxx yyyy
...numerous records of data
00033 0 000 xxxxx yyyy
...numerous records of data
then I have a file 2 that looks like
00001 0 000 xxxxx yyyy
00020 0 000 xxxxx yyyy
00033 0 000 xxxxx yyyy
....
I want to replace the x and y values in file 1 with the x and y values from file 2. The records from both files have a similar field 1 which is sequential NR record.
I'm sure I have to use an array but not sure how to go about it.
Thanks
I have a data file 1 that looks like:
00001 0 000 xxxxx yyyy
...numerous records of data
00020 0 000 xxxxx yyyy
...numerous records of data
00033 0 000 xxxxx yyyy
...numerous records of data
then I have a file 2 that looks like
00001 0 000 xxxxx yyyy
00020 0 000 xxxxx yyyy
00033 0 000 xxxxx yyyy
....
I want to replace the x and y values in file 1 with the x and y values from file 2. The records from both files have a similar field 1 which is sequential NR record.
I'm sure I have to use an array but not sure how to go about it.
Thanks