What if $rep isn't quoted?

main
SleepingCrows 2023-05-17 13:02:55 -04:00
parent 7727c2afd2
commit aedd710e9a
1 changed files with 4 additions and 3 deletions

View File

@ -11,12 +11,13 @@ echo "===FA.SH: The Random FA Sub Generator==="
# Check if the rep argument was filled already, test for non-numbers.
if [ -n "$rep"]; then
if [[ "$rep != [0-9]*" ]]; then
# if [[ -n "$rep"]]; then
# This works, only if it's empty. wat.
if [[ $rep != [0-9]* ]]; then
echo "Submission Count Argument is not an integer"
exit
fi
fi
# fi
# Todo: Validate the rep count is only numbers.
if [[ -z "$rep" ]]; then