also report the size of the tar file we're untarring.
authorfsgqa <fsgqa>
Wed, 18 Sep 2002 08:15:56 +0000 (08:15 +0000)
committerfsgqa <fsgqa>
Wed, 18 Sep 2002 08:15:56 +0000 (08:15 +0000)
run.tar

diff --git a/run.tar b/run.tar
index d502a85b62d5beaca6eabaeda3951724105f9ff5..f3a0315a7a2f8621fed9b96d322e5ba36b0b3c5c 100755 (executable)
--- a/run.tar
+++ b/run.tar
@@ -23,14 +23,16 @@ run_tar()
 {
        # %U=user %S=system %E=elapsed
        mkdir ./tar || exit 1
-       cd tar
-       /usr/bin/time -f '%U,%S,%E' tar xf $TARFILE || exit 1
+       size=`ls -lh $TARFILE | awk '{print $5}'`
+       time=`/usr/bin/time -f '%U,%S,%E' tar xf $TARFILE 2>&1`
+       [ $? -eq 0 ] || exit 1
+       echo "$size,$time"
        cd ..
        rm -fr ./tar || exit 1
 }
 
 if [ $# -gt 0 ]; then
-       echo "user,system,elapsed"
+       echo "size,user,system,elapsed"
        exit 0
 fi
 new_tar