The UNIX and Linux Forums  


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




Thread: Doubt in awk
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 10-10-2008
jisha jisha is offline
Registered User
  
 

Join Date: Jan 2008
Location: Bangalore,India
Posts: 144
I have been trying with this command
awk 'NR==FNR{_[NR]=$0;next;}{$1=_[FNR];print}' file1 file2

but i donot know how exactly this works. And it is printing only fileA rows. i don know where to tune it.