![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Manipulating File | rivendell500 | SUN Solaris | 2 | 03-25-2008 10:52 PM |
| manipulating csv to add extra row | neil546 | Shell Programming and Scripting | 3 | 07-16-2007 07:11 AM |
| Manipulating two files | rinku11 | UNIX for Advanced & Expert Users | 4 | 12-11-2006 03:47 AM |
| Manipulating awk $variables using sed? | r0sc0 | Shell Programming and Scripting | 2 | 04-04-2006 06:53 PM |
| date manipulating | tamer | UNIX for Dummies Questions & Answers | 3 | 01-08-2001 09:46 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I have a file like this:
Code:
Tue Apr 15 10:41:47 MDT 2008 FINAL RESULT; 6 Tue Apr 15 10:41:47 MDT 2008 FINAL RESULT; 2 Tue Apr 15 10:41:47 MDT 2008 FINAL RESULT; 5 When i do echo $seira it prints: 6 2 5 With this command i want to take the sum of the results from seira where they are stored 6+2+5 etc Code:
while read seira do echo $seira sum=0 sum='expr $sum + $seira' echo $sum done Last edited by Yogesh Sawant; 04-15-2008 at 04:21 AM.. Reason: added code tags |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|