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 UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 09-14-2007
vgersh99's Avatar
vgersh99 vgersh99 is offline
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 3,165
Code:
nawk '
{
   arr[FNR]+=$1
   fnr=FNR
}
END {
   for(i=1; i<=fnr; i++)
      print arr[i]
}
' *.dhm > result.txt
Reply With Quote