Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing two files using AWK

Status
Not open for further replies.

RJSHA1

Programmer
Apr 12, 2001
66
0
0
GB
Hi there,
I need to compare two files - containing bank sort codes and action codes - and I need to compare all the lines from file 1 with all the lines in file 2 and put all the lines that are different in file 3 e.g new sort code, different action code . One of our DBA's has said use AWK, but I have had only minimal exposure to it. Does any one have an example script that I could use/look at, or do they have any tips on how to do this.

Thanks
Bob...
 
Hi Bob,

Try the comm command ('man comm' for info)

Barry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top