#!/bin/bash
trap clean 1
clean() {
   X=1
   echo "Start formatting /dev/hda3:"
   while [ $X -lt 10 ]
   do
      echo -n ".."
      sleep 2
      X=$(( $X+1 ))
   done
   echo "Done"
   exit 0
}
while [ 0 ]
do
:
done
exit 0