how to match a column of a file 1 to text of another file 2 then if it matches print file 2

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












File 1
Name,TaxID,Lineage,Count,Proportion_All(%),Proportion_Classified(%)
Acaryochloris marina,155978,Bacteria;Cyanobacteria;;Synechococcales;Acaryochloridaceae;Acaryochloris,4,0.000218669,0.00120249
Anabaena cylindrica,1165,Bacteria;Cyanobacteria;;Nostocales;Nostocaceae;Anabaena,9,0.000492005,0.00270561



File 2
Object_ID, Length, Assignment
NODE_1_length_501653_cov_19.284,501653,1727163
NODE_2_length_458856_cov_17.1812,458856,374606
NODE_3_length_369230_cov_19.3769,369230,1727163
NODE_4_length_342860_cov_16.7318,342860,83263
NODE_5_length_301494_cov_19.1256,301494,1727163
NODE_6498_length_5833_cov_14.8079,5833,155978
NODE_6499_length_5833_cov_4.85133,5833,NA
NODE_6500_length_5831_cov_23.1697,5831,553814
NODE_6501_length_5831_cov_22.403,5831,795665



Output
Object_ID, Length, Assignment
NODE_6498_length_5833_cov_14.8079,5833,155978



ALl values in second column of File 1 matches the text in the very last array of File 2, if found, print File 2.
Please help.









share







New contributor




beth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    0
    down vote

    favorite












    File 1
    Name,TaxID,Lineage,Count,Proportion_All(%),Proportion_Classified(%)
    Acaryochloris marina,155978,Bacteria;Cyanobacteria;;Synechococcales;Acaryochloridaceae;Acaryochloris,4,0.000218669,0.00120249
    Anabaena cylindrica,1165,Bacteria;Cyanobacteria;;Nostocales;Nostocaceae;Anabaena,9,0.000492005,0.00270561



    File 2
    Object_ID, Length, Assignment
    NODE_1_length_501653_cov_19.284,501653,1727163
    NODE_2_length_458856_cov_17.1812,458856,374606
    NODE_3_length_369230_cov_19.3769,369230,1727163
    NODE_4_length_342860_cov_16.7318,342860,83263
    NODE_5_length_301494_cov_19.1256,301494,1727163
    NODE_6498_length_5833_cov_14.8079,5833,155978
    NODE_6499_length_5833_cov_4.85133,5833,NA
    NODE_6500_length_5831_cov_23.1697,5831,553814
    NODE_6501_length_5831_cov_22.403,5831,795665



    Output
    Object_ID, Length, Assignment
    NODE_6498_length_5833_cov_14.8079,5833,155978



    ALl values in second column of File 1 matches the text in the very last array of File 2, if found, print File 2.
    Please help.









    share







    New contributor




    beth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      File 1
      Name,TaxID,Lineage,Count,Proportion_All(%),Proportion_Classified(%)
      Acaryochloris marina,155978,Bacteria;Cyanobacteria;;Synechococcales;Acaryochloridaceae;Acaryochloris,4,0.000218669,0.00120249
      Anabaena cylindrica,1165,Bacteria;Cyanobacteria;;Nostocales;Nostocaceae;Anabaena,9,0.000492005,0.00270561



      File 2
      Object_ID, Length, Assignment
      NODE_1_length_501653_cov_19.284,501653,1727163
      NODE_2_length_458856_cov_17.1812,458856,374606
      NODE_3_length_369230_cov_19.3769,369230,1727163
      NODE_4_length_342860_cov_16.7318,342860,83263
      NODE_5_length_301494_cov_19.1256,301494,1727163
      NODE_6498_length_5833_cov_14.8079,5833,155978
      NODE_6499_length_5833_cov_4.85133,5833,NA
      NODE_6500_length_5831_cov_23.1697,5831,553814
      NODE_6501_length_5831_cov_22.403,5831,795665



      Output
      Object_ID, Length, Assignment
      NODE_6498_length_5833_cov_14.8079,5833,155978



      ALl values in second column of File 1 matches the text in the very last array of File 2, if found, print File 2.
      Please help.









      share







      New contributor




      beth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      File 1
      Name,TaxID,Lineage,Count,Proportion_All(%),Proportion_Classified(%)
      Acaryochloris marina,155978,Bacteria;Cyanobacteria;;Synechococcales;Acaryochloridaceae;Acaryochloris,4,0.000218669,0.00120249
      Anabaena cylindrica,1165,Bacteria;Cyanobacteria;;Nostocales;Nostocaceae;Anabaena,9,0.000492005,0.00270561



      File 2
      Object_ID, Length, Assignment
      NODE_1_length_501653_cov_19.284,501653,1727163
      NODE_2_length_458856_cov_17.1812,458856,374606
      NODE_3_length_369230_cov_19.3769,369230,1727163
      NODE_4_length_342860_cov_16.7318,342860,83263
      NODE_5_length_301494_cov_19.1256,301494,1727163
      NODE_6498_length_5833_cov_14.8079,5833,155978
      NODE_6499_length_5833_cov_4.85133,5833,NA
      NODE_6500_length_5831_cov_23.1697,5831,553814
      NODE_6501_length_5831_cov_22.403,5831,795665



      Output
      Object_ID, Length, Assignment
      NODE_6498_length_5833_cov_14.8079,5833,155978



      ALl values in second column of File 1 matches the text in the very last array of File 2, if found, print File 2.
      Please help.







      shell-script command-line pattern-matching





      share







      New contributor




      beth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      beth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      beth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 mins ago









      beth

      1




      1




      New contributor




      beth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      beth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      beth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          beth is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474693%2fhow-to-match-a-column-of-a-file-1-to-text-of-another-file-2-then-if-it-matches-p%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          beth is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          beth is a new contributor. Be nice, and check out our Code of Conduct.












          beth is a new contributor. Be nice, and check out our Code of Conduct.











          beth is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474693%2fhow-to-match-a-column-of-a-file-1-to-text-of-another-file-2-then-if-it-matches-p%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?