![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to use array values after the loop. | Devesh5683 | Shell Programming and Scripting | 1 | 05-13-2008 08:38 PM |
| getting values from variable in a loop | kriuz | Shell Programming and Scripting | 3 | 01-22-2008 05:50 PM |
| Help in adding positive & negative values in a column | berlin_germany | Shell Programming and Scripting | 4 | 02-09-2007 05:03 PM |
| adding variables for, for loop | jazz | High Level Programming | 3 | 03-13-2006 04:23 AM |
| Adding values then consolidating lines | tdavenpo | Shell Programming and Scripting | 0 | 01-03-2006 09:53 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
adding values with a loop
Hi there, I am checking disk spaced used on a box Code:
# df -k | grep dsk | awk {'print $3'}
2055463
20165785
18310202
32274406
I want to somehow add them up but am no quite sure how to do this in a loop. ...i.e Code:
for n in 'df -k | grep dsk | awk {'print $3}'
do
<some adding together code>
done
could someone point me in the right direction Cheers Last edited by hcclnoodles; 05-27-2008 at 06:42 AM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|