From b76915bfc3c54b1c34c106117f42eb795fa65c09 Mon Sep 17 00:00:00 2001 From: panda Date: Tue, 7 Mar 2017 10:57:24 +0100 Subject: [PATCH] add help feature --- rasplice2passwd.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rasplice2passwd.sh b/rasplice2passwd.sh index 2f0d06c..74f76c1 100755 --- a/rasplice2passwd.sh +++ b/rasplice2passwd.sh @@ -4,6 +4,16 @@ arbitrario="!" +if [[ $1 = "-h" ]] || [[ $1 = "--help" ]]; then + echo "usage: ./rasplice2passwd.sh [OPTIONS]" + echo " " + echo "Option Meaning" + echo "-y accept the default values" + echo " " + echo "if rasplice2passwd is invoked without options it guides you through all the features of your new awesome password" + exit 1 +fi + if [ "$1" = "-y" ] then sleep 0.1 @@ -28,5 +38,5 @@ rasplice=$(curl -s http://rasplice.contaminati.net/sproloquio.txt | grep -e "[^\ if [ ! -z "$limit" ] && [ ! $limit = "n" ]; then rasplice=$(echo $rasplice | cut -c1-$limit) fi - +echo "" echo $rasplice$randomchars$arbitrario