#!/bin/sh

SWAPSIZE=0

while [ "$SWAPSIZE" != "" ]; do
DF=`expr $SWAPSIZE`
cat << EOF > /tmp/tmpmsg
This is the last result from expr:
$DF

Please enter the next expr string:

EOF
 dialog --title "CALCULATOR" --inputbox "`cat /tmp/tmpmsg`" 20 70 \
 2> /tmp/SeSSize
 if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeSSize /tmp/tmpmsg
  exit
 fi
 SWAPSIZE="`cat /tmp/SeSSize`"
 rm -f /tmp/SeSSize /tmp/tmpmsg
done

clear

