Posts

Showing posts with the label difference

compare file A from file B, and save the content in file C

while read line; do grep -q $line A.txt || echo $line; done < B.txt >C.txt I have got the above example, its very interesting and helpful as well.  If A  is the file with the first content and B  is the file with the second content.  It prints what is not found in the second file. Can save output using redirection operator.