I have 2 text files
text1.txt
contains:
fc1/1 storage
fc1/5 switch
fc1/7 replication
text2.txt
contains:
fc1/1 storage
fc1/5 nas
fc1/7 replication
I want a script that compares the 2 text files and generate text found on text2.txt
but not on text1.txt
in a text file named difference.txt
difference.txt
contains
fc1/5 nas
any ideas?
Maybe ...
Search
text2.txt
for lines not matching (/v
) lines intext1.txt