Here is a newer patch that changes all bc usage to shell arithmetic. Is there 
anyone that can test this on ash and make sure it works? BTW, I am not 
subscribed, so please CC me, if needed.

Thanks,
wt

--- aoetools-10/aoe-stat        2005-10-18 11:11:22.000000000 -0600
+++ aoetools-10.new/aoe-stat    2006-09-19 17:55:34.806586510 -0600
@@ -21,7 +21,7 @@
 
        dev=`echo "$d" | sed 's/.*!//'`
        sectors="`cat \"$d/size\"`"
-       psize=`echo "(512000 * $sectors) / (1000 * 1000 * 1000)" | bc`
+       psize=`echo $(( (512000 * $sectors) / (1000 * 1000 * 1000) ))`
        psize=`printf "%04d\n" $psize | sed 's!\(...\)$!.\1!'`
        printf "$format" \
                "$dev" \
--- aoetools-10/aoe-mkshelf.in  2005-10-18 11:11:22.000000000 -0600
+++ aoetools-10.new/aoe-mkshelf.in      2006-09-20 11:17:09.841899344 -0600
@@ -9,13 +9,13 @@
 dir=$1
 shelf=$2
 [EMAIL PROTECTED]@
-maxslot=`echo $nslots - 1 | bc`
+maxslot=$(( $nslots - 1 ))
 MAJOR=152
 
 set -e
 
-minor=`echo $nslots \* $shelf \* $n_partitions | bc`
-endp=`echo $n_partitions - 1 | bc`
+minor=$(( $nslots * $shelf * $n_partitions ))
+endp=$(( $n_partitions - 1 ))`
 for slot in `seq 0 $maxslot`; do
        for part in `seq 0 $endp`; do
                name=e$shelf.$slot

-- 
Warren Turkal, Research Associate III/Systems Administrator
Colorado State University, Dept. of Atmospheric Science


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to