The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 03-10-2009
R.T. R.T. is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 12

Code:
awk '{A=$1;B=$2;C=C+A*B;print A" x "B" = "A*B};END{print "Total = "C}' filename


Last edited by R.T.; 03-10-2009 at 07:32 PM.. Reason: dropped a }