Jan 31, 2003 #1 vti Technical User Feb 26, 2001 189 TR I got a data like : 68240000.00 144290000.00 636070000.00 480000.00 26360000.00 50560000.00 20740000.00 17520000.00 How can i calculate the lines and get the total number of lines.? thanks for any help
I got a data like : 68240000.00 144290000.00 636070000.00 480000.00 26360000.00 50560000.00 20740000.00 17520000.00 How can i calculate the lines and get the total number of lines.? thanks for any help
Jan 31, 2003 #2 dickiebird Programmer Feb 14, 2002 758 GB wc -l < filename will give you number of lines in a file what do you mean by calculate ? Dickie Bird (-))) Upvote 0 Downvote
wc -l < filename will give you number of lines in a file what do you mean by calculate ? Dickie Bird (-)))
Jan 31, 2003 Thread starter #3 vti Technical User Feb 26, 2001 189 TR Sorry it's my fault ,i didn't mean number of lines.I need to calculate total value of lines.Like 68240000.00+144290000.00+636070000.00+480000.00+26360000.00+50560000.00+20740000.00+17520000.00 = ? Upvote 0 Downvote
Sorry it's my fault ,i didn't mean number of lines.I need to calculate total value of lines.Like 68240000.00+144290000.00+636070000.00+480000.00+26360000.00+50560000.00+20740000.00+17520000.00 = ?
Jan 31, 2003 #4 dickiebird Programmer Feb 14, 2002 758 GB Try awk 'BEGIN {SCNT=0}{SCNT+=$1}END{print SCNT}' infile HTH Dickie Bird (-))) Upvote 0 Downvote
Feb 6, 2003 Thread starter #5 vti Technical User Feb 26, 2001 189 TR it works well thanks a lot Upvote 0 Downvote