Linux grep what in file 1 is in file 2 [duplicate]

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











up vote
-2
down vote

favorite













This question already has an answer here:



  • Output the common lines (similarities) of two text files (the opposite of diff)?

    5 answers



File 1:



1234567890123456,00,00,000
1111111111111111,11,11,1111


File 2



1111111111111111,11,11,1111
9999999999999999,99,99,999


So i want to know what in file 1 is in file 2 which is




Output:




1111111111111111,11,11,1111






share|improve this question












marked as duplicate by Sundeep, John, John1024, Jeff Schaller, αғsнιη Nov 27 '17 at 16:10


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 1




    How have you tried to solve this problem so far, and what have the results been?
    – John
    Nov 27 '17 at 15:46










  • @John I don't know how to resolve it so that's why am asking if someone know
    – Î±Ô‹É±Ò½Ôƒ αмєяιcαη
    Nov 27 '17 at 15:48






  • 2




    We're willing to help. We're not willing to do everything for you. You need to make an effort to figure this out on your own first. I would start by reading @Sundeep's link.
    – John
    Nov 27 '17 at 15:51










  • @John, i already make effort before asking the question. but failed, that's why i asked my question and by the link which Sundeep provided i were able to resolve my issue ! so thank you
    – Î±Ô‹É±Ò½Ôƒ αмєяιcαη
    Nov 27 '17 at 16:02










  • @Sundeep thank you so much man
    – Î±Ô‹É±Ò½Ôƒ αмєяιcαη
    Nov 27 '17 at 16:02














up vote
-2
down vote

favorite













This question already has an answer here:



  • Output the common lines (similarities) of two text files (the opposite of diff)?

    5 answers



File 1:



1234567890123456,00,00,000
1111111111111111,11,11,1111


File 2



1111111111111111,11,11,1111
9999999999999999,99,99,999


So i want to know what in file 1 is in file 2 which is




Output:




1111111111111111,11,11,1111






share|improve this question












marked as duplicate by Sundeep, John, John1024, Jeff Schaller, αғsнιη Nov 27 '17 at 16:10


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 1




    How have you tried to solve this problem so far, and what have the results been?
    – John
    Nov 27 '17 at 15:46










  • @John I don't know how to resolve it so that's why am asking if someone know
    – Î±Ô‹É±Ò½Ôƒ αмєяιcαη
    Nov 27 '17 at 15:48






  • 2




    We're willing to help. We're not willing to do everything for you. You need to make an effort to figure this out on your own first. I would start by reading @Sundeep's link.
    – John
    Nov 27 '17 at 15:51










  • @John, i already make effort before asking the question. but failed, that's why i asked my question and by the link which Sundeep provided i were able to resolve my issue ! so thank you
    – Î±Ô‹É±Ò½Ôƒ αмєяιcαη
    Nov 27 '17 at 16:02










  • @Sundeep thank you so much man
    – Î±Ô‹É±Ò½Ôƒ αмєяιcαη
    Nov 27 '17 at 16:02












up vote
-2
down vote

favorite









up vote
-2
down vote

favorite












This question already has an answer here:



  • Output the common lines (similarities) of two text files (the opposite of diff)?

    5 answers



File 1:



1234567890123456,00,00,000
1111111111111111,11,11,1111


File 2



1111111111111111,11,11,1111
9999999999999999,99,99,999


So i want to know what in file 1 is in file 2 which is




Output:




1111111111111111,11,11,1111






share|improve this question













This question already has an answer here:



  • Output the common lines (similarities) of two text files (the opposite of diff)?

    5 answers



File 1:



1234567890123456,00,00,000
1111111111111111,11,11,1111


File 2



1111111111111111,11,11,1111
9999999999999999,99,99,999


So i want to know what in file 1 is in file 2 which is




Output:




1111111111111111,11,11,1111




This question already has an answer here:



  • Output the common lines (similarities) of two text files (the opposite of diff)?

    5 answers









share|improve this question











share|improve this question




share|improve this question










asked Nov 27 '17 at 15:43









αԋɱҽԃ αмєяιcαη

412418




412418




marked as duplicate by Sundeep, John, John1024, Jeff Schaller, αғsнιη Nov 27 '17 at 16:10


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Sundeep, John, John1024, Jeff Schaller, αғsнιη Nov 27 '17 at 16:10


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









  • 1




    How have you tried to solve this problem so far, and what have the results been?
    – John
    Nov 27 '17 at 15:46










  • @John I don't know how to resolve it so that's why am asking if someone know
    – Î±Ô‹É±Ò½Ôƒ αмєяιcαη
    Nov 27 '17 at 15:48






  • 2




    We're willing to help. We're not willing to do everything for you. You need to make an effort to figure this out on your own first. I would start by reading @Sundeep's link.
    – John
    Nov 27 '17 at 15:51










  • @John, i already make effort before asking the question. but failed, that's why i asked my question and by the link which Sundeep provided i were able to resolve my issue ! so thank you
    – Î±Ô‹É±Ò½Ôƒ αмєяιcαη
    Nov 27 '17 at 16:02










  • @Sundeep thank you so much man
    – Î±Ô‹É±Ò½Ôƒ αмєяιcαη
    Nov 27 '17 at 16:02












  • 1




    How have you tried to solve this problem so far, and what have the results been?
    – John
    Nov 27 '17 at 15:46










  • @John I don't know how to resolve it so that's why am asking if someone know
    – Î±Ô‹É±Ò½Ôƒ αмєяιcαη
    Nov 27 '17 at 15:48






  • 2




    We're willing to help. We're not willing to do everything for you. You need to make an effort to figure this out on your own first. I would start by reading @Sundeep's link.
    – John
    Nov 27 '17 at 15:51










  • @John, i already make effort before asking the question. but failed, that's why i asked my question and by the link which Sundeep provided i were able to resolve my issue ! so thank you
    – Î±Ô‹É±Ò½Ôƒ αмєяιcαη
    Nov 27 '17 at 16:02










  • @Sundeep thank you so much man
    – Î±Ô‹É±Ò½Ôƒ αмєяιcαη
    Nov 27 '17 at 16:02







1




1




How have you tried to solve this problem so far, and what have the results been?
– John
Nov 27 '17 at 15:46




How have you tried to solve this problem so far, and what have the results been?
– John
Nov 27 '17 at 15:46












@John I don't know how to resolve it so that's why am asking if someone know
– Î±Ô‹É±Ò½Ôƒ αмєяιcαη
Nov 27 '17 at 15:48




@John I don't know how to resolve it so that's why am asking if someone know
– Î±Ô‹É±Ò½Ôƒ αмєяιcαη
Nov 27 '17 at 15:48




2




2




We're willing to help. We're not willing to do everything for you. You need to make an effort to figure this out on your own first. I would start by reading @Sundeep's link.
– John
Nov 27 '17 at 15:51




We're willing to help. We're not willing to do everything for you. You need to make an effort to figure this out on your own first. I would start by reading @Sundeep's link.
– John
Nov 27 '17 at 15:51












@John, i already make effort before asking the question. but failed, that's why i asked my question and by the link which Sundeep provided i were able to resolve my issue ! so thank you
– Î±Ô‹É±Ò½Ôƒ αмєяιcαη
Nov 27 '17 at 16:02




@John, i already make effort before asking the question. but failed, that's why i asked my question and by the link which Sundeep provided i were able to resolve my issue ! so thank you
– Î±Ô‹É±Ò½Ôƒ αмєяιcαη
Nov 27 '17 at 16:02












@Sundeep thank you so much man
– Î±Ô‹É±Ò½Ôƒ αмєяιcαη
Nov 27 '17 at 16:02




@Sundeep thank you so much man
– Î±Ô‹É±Ò½Ôƒ αмєяιcαη
Nov 27 '17 at 16:02










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










Using the following command i were able to resolve my issue



grep -Fxf file1 file2






share|improve this answer



























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    Using the following command i were able to resolve my issue



    grep -Fxf file1 file2






    share|improve this answer
























      up vote
      0
      down vote



      accepted










      Using the following command i were able to resolve my issue



      grep -Fxf file1 file2






      share|improve this answer






















        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        Using the following command i were able to resolve my issue



        grep -Fxf file1 file2






        share|improve this answer












        Using the following command i were able to resolve my issue



        grep -Fxf file1 file2







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 27 '17 at 15:59









        αԋɱҽԃ αмєяιcαη

        412418




        412418












            Popular posts from this blog

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

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay