From 9e358c3ffc2a5197b2c4b146af8257e6aea0d2f5 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Tue, 30 Jun 2020 19:37:16 +0530 Subject: [PATCH] Made the script prettier --- CheckIntegrity | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/CheckIntegrity b/CheckIntegrity index d54e83c..d6aeb19 100755 --- a/CheckIntegrity +++ b/CheckIntegrity @@ -10,17 +10,10 @@ error(){ } # check if asking for help -if [ $# -eq 1 ] && [ $1 = "-h" ]; then - error - exit 1 -fi +[ $# -eq 1 ] & [ $1 = "-h" ] && error && exit 1 # check validity of input -if [ $# -ne 3 ]; then - printf "${bold}Input is wrong!${normal}\n\n" - error - exit -1 -fi +[ $# -ne 3 ] && printf "${bold}Input is wrong!${normal}\n\n" && error && exit -1 # main code f=$1