From f8274a4bb71388887a1f3a8608bdb124285cffea Mon Sep 17 00:00:00 2001 From: silvernode Date: Fri, 5 Feb 2016 15:22:42 -0700 Subject: [PATCH] options are now the primary use case --- Bash Scripts/adduser.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Bash Scripts/adduser.sh b/Bash Scripts/adduser.sh index 581d926..1fc0817 100755 --- a/Bash Scripts/adduser.sh +++ b/Bash Scripts/adduser.sh @@ -46,7 +46,7 @@ Remove_user(){ if [ -d /home/${duser} ];then rm -R /home/${duser} else - echo "User creation failed" + echo "User deletion failed" fi } main(){ @@ -70,4 +70,8 @@ main(){ done } -Create_user +case "$1" in + add ) Create_user;; + remove ) Remove_user;; + * ) echo "Usage: mkusr [add | remove]";; +esac