I have two files with each of them containing two columns(fields) of
data separated by a space. I need to read in both files into an array
I guess and compare the first column(field) of the first file with the
first column(field) of the second file. I have an example of the two
files below:
FileA FileB
rich fdfewfew john sdsd32das
tom 324dfdsfs bill sad213dsd
bill fdd34dsd ray dfdf3fdd
mary dsdfs3r steve fdfr4rfds
steve fdsf3zf rich sddsf3r43
I need the output from the comparison to show what FileA has the FileB
doesn't and what FileB has that FileA doesn't based on the comparison
of column(field one) only.
Example output:
Output from FileA Output from FileB
Tom 324dfdsfs john sdsd32das
mary dsdfs3r ray dfdf3fdd
So basically, how do I read in two files and compare the first field
of each file against each other and produce output using AWK.
Thanks
--------------------------------------------------------------------------------
data separated by a space. I need to read in both files into an array
I guess and compare the first column(field) of the first file with the
first column(field) of the second file. I have an example of the two
files below:
FileA FileB
rich fdfewfew john sdsd32das
tom 324dfdsfs bill sad213dsd
bill fdd34dsd ray dfdf3fdd
mary dsdfs3r steve fdfr4rfds
steve fdsf3zf rich sddsf3r43
I need the output from the comparison to show what FileA has the FileB
doesn't and what FileB has that FileA doesn't based on the comparison
of column(field one) only.
Example output:
Output from FileA Output from FileB
Tom 324dfdsfs john sdsd32das
mary dsdfs3r ray dfdf3fdd
So basically, how do I read in two files and compare the first field
of each file against each other and produce output using AWK.
Thanks
--------------------------------------------------------------------------------