in reply to Re: comparing an ID fom one file to the records in the second file
in thread comparing an ID fom one file to the records in the second file

I tried this before posting the question. The newfile.txt is empty. Somehow the comparison is not done. :(

  • Comment on Re^2: comparing an ID fom one file to the records in the second file

Replies are listed 'Best First'.
Re^3: comparing an ID fom one file to the records in the second file
by hippo (Archbishop) on Dec 02, 2017 at 15:28 UTC

    You must be doing something wrong since it works fine for me:

    $ ls BreastCnAPmiRNAsID.txt tarbaseData.txt $ cat BreastCnAPmiRNAsID.txt hsa-miR-4700-5p hsa-miR-300 hsa-miR-381 hsa-miR-4803 $ cat tarbaseData.txt ENSG00000005175 RPAP3 hsa-miR-3199 Homo sapiens 293S Ki +dney NA HITS-CLIP POSITIVE DIRECT DOWN treatment:em +etine ENSG00000005175 RPAP3 hsa-miR-342-3p Homo sapiens HELA +Cervix Cancer/Malignant HITS-CLIP POSITIVE DIRECT DOWN + Hela cells were treated with control shRNA. ENSG00000005175 RPAP3 hsa-miR-381-3p Homo sapiens HS5 B +one Marrow Normal/Primary HITS-CLIP POSITIVE DIRECT DO +WN NA ENSG00000005187 ACSM3 hsa-miR-196a-5p Homo sapiens EF3DAGO +2 NA Normal/Primary PAR-CLIP POSITIVE DIRECT DOWN + NA $ grep -f BreastCnAPmiRNAsID.txt tarbaseData.txt > output.txt $ cat output.txt ENSG00000005175 RPAP3 hsa-miR-381-3p Homo sapiens HS5 B +one Marrow Normal/Primary HITS-CLIP POSITIVE DIRECT DO +WN NA $

      Actually my command never executes. It just stays in the executing mode and when i go to the destination folder the size of output.txt remains 0bytes. I always had to press ctrl + C to stop execution so that the cursor returns to the current directory.