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 -->
  #5 (permalink)  
Old 10-08-2008
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,958
you can try something like,

[ not tested ]


Code:
awk 'BEGIN{ while ( getline < "file_1" ) { arr[$0]++ } }{ if ( $0 in arr ) { printf "%s is duplicate\n", $0 } }' file_2