compare two lines and print unmatched words from two files

by user2132767   Last Updated July 12, 2019 23:02 PM

I have two files,Lets say file1 and file2

file1 has "a b c d" each one is space delimited
file2 has "b d" each one is space delimited

I wanted to print "a d" in file3. since all I am trying to do is non matching words from file1.

I have been trying with "awk", "for loop", "while loop" but unable to get to a solution. any idea of how to minus and get to only unmatched ones.

Thank you all.



Related Questions




Run .sh script on Ubuntu without using terminal

Updated April 05, 2015 18:00 PM

Error when running script in bash

Updated April 16, 2015 21:00 PM

Exit terminal after running a bash script

Updated April 20, 2015 22:00 PM