Merge pull request #1 from SinTan1729/beautify

Made the script prettier
This commit is contained in:
SinTan1729 2020-06-30 19:43:25 +05:30 committed by GitHub
commit ffc8815554
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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