From: Darryl Ousterhout (D.Ousterhout@LABSAFETY.COM)
Date: Mon Aug 12 2002 - 16:45:40 EDT
This will add your column together. It's ugly but it works.
df -Ik | awk '{ print $4 }' | sed 1d | awk '{ sum += $1 } END { print sum }'
col=$1
HTH
Darryl
-----Original Message-----
From: Miller, Dave [mailto:Dave.Miller@BHS.ORG]
Sent: Monday, August 12, 2002 3:26 PM
To: aix-l@Princeton.EDU
Subject: question for script whizzes
Is there an easy way to take the output of this
df -Ik | awk {'print $4 '}
($4 is the free space from df command), and add the resulting numbers
together with dc or bc, in
a script?
thanks.
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:08 EDT