From 0fa95f8eac29e1063627a2af7a2c60d7ae485cae Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Mon, 21 Jul 2014 23:28:57 +0200 Subject: [PATCH] Updated mimimi --- mimimi.sh | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/mimimi.sh b/mimimi.sh index e669f38..8654a10 100755 --- a/mimimi.sh +++ b/mimimi.sh @@ -1,6 +1,21 @@ #!/bin/bash -i=0; +usage () +{ + echo 'mimimi by Klaus-Uwe Mitterer'; + echo 'Usage: mimimi [-e]'; + echo 'Options:'; + echo '-e - Exponential'; + exit; +} + +i=1; + +if [ $# -gt 0 ] + then if [ $1 != "-e" -o $# -gt 1 ] + then usage; + fi; +fi; while true; @@ -9,6 +24,10 @@ while true; done; printf '\n'; - i=$((i+1)); -done + if [[ $1 = -e ]] + then i=$((i*2)) + else i=$((i+1)) + fi + +done;