If I know that file1 and file2 are the same (they are duplicates), is there anyways that I can replace file2 with a hardlink to file1? I tried to use
ln file2 file1
Is this correct? Thanks.
on 01/18/2013 – Made popular on 01/18/2013
file2 contains lakhs of records and not in sorted order
i want to retrive only the records from file2 by searcing the first field of file 1
grep ^1 file2 >out.txt
grep ^2 file2 >>out.txt
grep ^3 file2>>out.txt
this i need to do 3 time
I have very limited coding skills but I'm wondering if someone could help me with this. There are many threads about matching strings in two files, but I have no idea how to add a column from one file to another based on a matching string.
I'm looking to match column1 in file1 to the number following the string "Gene_" in file2.
I want to compare two files. I think using grep is the way to go but I do not know how to set this up. Let me show an example:
File1 has 1000 items, File2 has 700 items
I need to take the first item in File1 and search the entire contents of File2 to see if there is a match there. IF there is a match (meaning the same item is in both File1 and File2) then do nothing.