Oct 3, 2002 #1 sco21 Technical User May 20, 2002 67 GR I have a file with some numbers on it. 2 3 4 5 6 7 8 8 How can I add all this numbers and make a sum of them whith expr ? how? thanks
I have a file with some numbers on it. 2 3 4 5 6 7 8 8 How can I add all this numbers and make a sum of them whith expr ? how? thanks
Oct 3, 2002 1 #2 marsd IS-IT--Management Apr 25, 2001 2,218 US sum=0 for xx in `cat filename` do sum=`expr $xx + $sum` done echo $sum Upvote 0 Downvote