The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 11-21-2008
cdfd123 cdfd123 is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 112
Cool awk command to comapre two files

if u have two files
first file and second file

awk command will be

awk 'BEGIN {while (getline <"first file") {arr[$0]++}}
{ if (!($0 in arr) {print }}' second file