VSleep - La commande Sleep visuelle
Présentation
-
Ce script est l'équivalent de la commande sleep, mais ajoute une fonction visuelle.
La syntaxe est la suivante:
-
vsleep <Temps_d_attente_en_secondes>
Le 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