I have been trying to do this for sometime now but I have not been able to do it. Say I have a file named 'John', with content like this:
Code:
6
10
12
988
266
192
234
and I have other files with each file listed from 1- 50000 like this:
file A
Code:
1 0
2 1
3 0
4 0
5 0
6 0
7 0
8 0
9 1
10 0
. 1
. 0
. 1
50000 0
I have many of such files A but with different filenames. These are all in the same directory.
I want to use file named "john" to compare field 1 in file A and all the other files like this: wherever you have 6 in filed 1 file A print entire line, then take 10 from file John look for 10 in file A and print line. Output will look like this:
This comparism is then done for each other file
Thanks all