Hi,
I have 2 files with contents in them and I need to compare each item in each file.
File1:
item4
item5
File2:
item2
item3
item5
item6
The items names can be of different lengths.
If the items in the File1 are not in File2,
delete the missing item in File1.
The resulting File1 in the above example should be:
File1:
item5
How can I do this using shell script? Thanks in advance!
I have 2 files with contents in them and I need to compare each item in each file.
File1:
item4
item5
File2:
item2
item3
item5
item6
The items names can be of different lengths.
If the items in the File1 are not in File2,
delete the missing item in File1.
The resulting File1 in the above example should be:
File1:
item5
How can I do this using shell script? Thanks in advance!