What if $rep isn't quoted?
parent
7727c2afd2
commit
aedd710e9a
|
@ -11,12 +11,13 @@ echo "===FA.SH: The Random FA Sub Generator==="
|
||||||
|
|
||||||
# Check if the rep argument was filled already, test for non-numbers.
|
# Check if the rep argument was filled already, test for non-numbers.
|
||||||
|
|
||||||
if [ -n "$rep"]; then
|
# if [[ -n "$rep"]]; then
|
||||||
if [[ "$rep != [0-9]*" ]]; then
|
# This works, only if it's empty. wat.
|
||||||
|
if [[ $rep != [0-9]* ]]; then
|
||||||
echo "Submission Count Argument is not an integer"
|
echo "Submission Count Argument is not an integer"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# Todo: Validate the rep count is only numbers.
|
# Todo: Validate the rep count is only numbers.
|
||||||
if [[ -z "$rep" ]]; then
|
if [[ -z "$rep" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue