Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: AW: Free Space on Disk
On Mon, 10 Dec 2001, Rienecker, Fa. Evenio, ITS P, M wrote:
CR> Hi,
CR> try using the 'expr' command.
CR> You can write shell scripts like
CR>
CR> i=`expr $j + $k`
CR>
CR> This is a bit awkward and painfully slow if you add up a lot of values, but it works. Look at the man pages.
CR>
CR>
CR> Christian.
there is also a slightly faster one (at least in bash):
# k=1; time while [ $k -lt 10000 ] ; do k=$(( $k + 1 )) ; done;
real 0m1.355s
user 0m0.870s
sys 0m0.010s
# k=1; time while [ $k -lt 10000 ] ; do k=`expr $k + 1` ; done;
real 1m25.977s
user 0m24.130s
sys 0m30.190s
c ya
Sergei
--------------------------------------------------------------------
eMail: Sergei.Haller@math.uni-giessen.de
--------------------------------------------------------------------
Be careful of reading health books, you might die of a misprint.
-- Mark Twain
Home |
Main Index |
Thread Index