diff --git a/scripts/config.sh b/scripts/config.sh index db8b799..f9bb7e3 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -346,16 +346,16 @@ function isGraded { # $1 = the grade file function getGrade { - head -n 1 "$1" | cut -d'/' -f1 | sed 's/ *//g' + head -n 1 "$1" | cut -d'/' -f1 | sed 's/ *//g' | sed 's/[^[:digit:].]//g' #head -n 1 "$1" | sed 's/\// /' | awk '{print $1;}' } # $1 = the grade file function getOutOf { if isGraded $1; then - head -n 1 "$1" | sed 's/\// /' | awk '{print $2;}' + head -n 1 "$1" | sed 's/\// /' | awk '{print $2;}' | sed 's/[^[:digit:].]//g' else - head -n 1 "$1" | sed 's/\// /' | awk '{print $1;}' + head -n 1 "$1" | sed 's/\// /' | awk '{print $1;}' | sed 's/[^[:digit:].]//g' fi }