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 -->
  #4 (permalink)  
Old 03-17-2008
radoulov's Avatar
radoulov radoulov is online now Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,915
If order matters:


Code:
awk 'NR==FNR{x[$3]=$0;next}$1 in x&&$0=x[$1] FS$2' x.txt y.txt

Use nawk or /usr/xpg4/bin/awk on Solaris.