Skip to main content
deleted 16 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 238

I have 2 files. names1.txt and names2.txt.

I need to know that which names are present in names1.txt but are missing in names2.txt. Then I need to store them in another file missing_names.txt.

Diff command gives the difference but it also prints lot many information. Also, I do not want to know the names which are in names2.txt but are missing in names1.txt. So its like (names1.txt - names2.txt) operation.

Please help.

I have 2 files. names1.txt and names2.txt.

I need to know that which names are present in names1.txt but are missing in names2.txt. Then I need to store them in another file missing_names.txt.

Diff command gives the difference but it also prints lot many information. Also, I do not want to know the names which are in names2.txt but are missing in names1.txt. So its like (names1.txt - names2.txt) operation.

Please help.

I have 2 files. names1.txt and names2.txt.

I need to know that which names are present in names1.txt but are missing in names2.txt. Then I need to store them in another file missing_names.txt.

Diff command gives the difference but it also prints lot many information. Also, I do not want to know the names which are in names2.txt but are missing in names1.txt. So its like (names1.txt - names2.txt) operation.

Source Link
romil gaurav
  • 273
  • 2
  • 5
  • 10

Find ONLY the difference (extra) between two files in unix

I have 2 files. names1.txt and names2.txt.

I need to know that which names are present in names1.txt but are missing in names2.txt. Then I need to store them in another file missing_names.txt.

Diff command gives the difference but it also prints lot many information. Also, I do not want to know the names which are in names2.txt but are missing in names1.txt. So its like (names1.txt - names2.txt) operation.

Please help.