VSleep - Visual Sleep Command
Presentation
-
This script is similar to sleep command, but adds a visual function.
Syntax:
-
vsleep <Waiting_time_in_seconds>
The script
#!/bin/bash
########################################################
# Script: vsleep (Visual Sleep) #
# Version: 1.00 - June 2008 #
# Author: Jerome DESMOULINS (http://www.desmoulins.fr) #
########################################################
# This script is a visual version of sleep command #
# Usage: vsleep <Time to sleep in seconds> #
########################################################
#Check for command line usage
if test $# -ne 1
then
echo " Syntax: $0 <Time_in_Seconds>"
exit 1
fi
#Main loop
i=$1
while test $i -gt 0
do
echo -n "${i}... "
((i=i-1))
sleep 1
done
echo
#End of script