0

I have a file1.txt and file2.txt i want to tell if all the information in file1 is in file2. If it is, then output it to file3.txt otherwise dont do anything.

I looked at comm command and diff, but it isnt apparent comm may be best for this use case.

can someone help?

Thanks

user700070
  • 153
  • 3
  • 8

1 Answers1

0

I resolved my own issue with the following, maybe it will help someone:

$ comm -1 -2 <file1.txt> <file2.txt>
user700070
  • 153
  • 3
  • 8