Made POSIX compliant

This commit is contained in:
Sayantan Santra 2022-01-07 02:47:57 -06:00
parent 4c45b9f293
commit e778fc86e2

View file

@ -16,8 +16,7 @@ error(){
[ $# -ne 3 ] && printf "${bold}Input is wrong!${normal}\n\n" && error && exit -1 [ $# -ne 3 ] && printf "${bold}Input is wrong!${normal}\n\n" && error && exit -1
# main code # main code
f=$1 f="$1sum $2 | cut -d ' ' -f1"
f+="sum $2 | cut -d ' ' -f1"
if [ $(eval $f) = "$3" ]; then if [ $(eval $f) = "$3" ]; then
echo "$2 is ${bold}fine.${normal}" echo "$2 is ${bold}fine.${normal}"