hi.. I want to compare records present in 1 file with those in 3 other files and print those records of file 1 which are not present in any of the files. for eg -
file1 file2 file3 file4
1 1 5 7
2 2 6 9
3
4
5
6
7
8
9
output should contain :
3
4
8
nawk 'NR==FNR{a[$0]++;next} !a[$0] or !a[$0] or !a[$0]' file1 file2 file3 file4
i am using this code but i dont think it is correct.. problem arised when the file which i wanted to compare was huge and nawk ran out of space giving out of space tostring error.. so now i have splitted the file into 3 parts and then comparing.. also can we have different names for arrays used in this script to avoid the similar situation. I am using solaris system..