Hi,
I was trying to use awk - but got a little lost to be honest
I have two files - I need to do a lookup on the first file to see what to update in the second file.
I need to be able to check any 2 fields in file 1 to be equal to x and y from those results where contents of file1.$1=file2.$1 then update any field in the second file
i.e search (00000008) and replace (00000000) file2.$3 where file1.$1 = file2.$1 and file1.$4="DK0000" and file1.$5="dk"
file one looks like
000003E8|00000000|00000000|DK0000|dk||0|0000000A|01048576|01048576|00000000|00000000|00000000|00000000|0|0||||||||
file two looks like
00001007|00719CC0|00000008|00000000|00000000|03036732|00000000|03036732|00000000|00000000|00000001|3A3AA276|3A3AA276|3A3E8DB6||||||||||||||||||||||
Thanks in advance
Martin
I was trying to use awk - but got a little lost to be honest
I have two files - I need to do a lookup on the first file to see what to update in the second file.
I need to be able to check any 2 fields in file 1 to be equal to x and y from those results where contents of file1.$1=file2.$1 then update any field in the second file
i.e search (00000008) and replace (00000000) file2.$3 where file1.$1 = file2.$1 and file1.$4="DK0000" and file1.$5="dk"
file one looks like
000003E8|00000000|00000000|DK0000|dk||0|0000000A|01048576|01048576|00000000|00000000|00000000|00000000|0|0||||||||
file two looks like
00001007|00719CC0|00000008|00000000|00000000|03036732|00000000|03036732|00000000|00000000|00000001|3A3AA276|3A3AA276|3A3E8DB6||||||||||||||||||||||
Thanks in advance
Martin