Quantcast
Channel: Active questions tagged bash+awk - Ask Ubuntu
Viewing all articles
Browse latest Browse all 102

compare two lines and print unmatched words from two files

$
0
0

I have two files,Lets say file1 and file2

file1 has "eipassoc-03cd9117d7188d2 eipasoc-47367a3f eipasoc-bbbddc3 eipassoc-10bbfb6" each one is space delimited
file2 has "eipasoc-47367a3f eipassoc-10bbfb6" each one is space delimited

I wanted to print "eipassoc-03cd9117d7188d2 eipasoc-bbbddc3" 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.


Viewing all articles
Browse latest Browse all 102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>