I have multiple files. For now, let's say I have two of the following style
cat 1.txt
cat 2.txt
output.txt
Please note that my files are not sorted and in the output file I need another extra column that says the file from which it is coming. I have more than 100 files to do this.
A 2 3 -1 -2 3 4 5 6 -7 80
D 4 5 90 88 76 54 32 1 0 1
M N O 99 65 34 22 13 9 4 3
Output.txt
M N O 99 65 34 22 13 9 4 3 4.txt
K 7 8 1 32 33 45 67 98 76 34 1.txt
I 7 8 I A M A N I N D 1.txt
L 2 3 G O T O H E L L 1.txt
D O L K I N H J K I L 2.txt
J G H J L K M N J U I 2.txt
M A A T U J H E S A L 2.txt
I just need a match on the first three columns if it is present in more than one file it should be eliminated. Thanks for all ur help.
I think so. But, my only question is that will your code matches numbers in the first three columns. Because, when u wrote the code all u had was alphabets.
Thanks for all ur help.
Sorry mods for somehow overlooking to include the code tags.
Earlier before I asked for the unique ones. Now, I need the same unique ones but the duplicates should also be printed. If a record is present once or more than once across multiple files, it should be printed only once in my final output.