Skip to content

Instantly share code, notes, and snippets.

@shiumachi
Created November 28, 2012 05:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shiumachi/4159216 to your computer and use it in GitHub Desktop.
Save shiumachi/4159216 to your computer and use it in GitHub Desktop.
wait N seconds
function wait_seconds()
{
func_name="wait_seconds"
if ! expr "$1" : '[0-9]*' > /dev/null ;
then
echo "${func_name} ERROR: argument is not number"
return
fi
for i in `seq $1`; do
echo "wait for `expr $1 + 1 - ${i}` seconds..."
sleep 1
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment