Tell us what’s happening:
i don’t understand why this test fails.
You used the double square brackets with your if statement in the last program, but you can use the double parenthesis with these operators as well. In your script, create an if statement that uses double parenthesis for the condition. Check if the number variable is less than or equal to 15. If it is, use your two variables to print The next number is, B:.
Your code so far
#!/bin/bash
\# Bingo Number Generator
echo -e "\\n\~\~ Bingo Number Generator \~\~\\n"
NUMBER=$(( RANDOM % 75 + 1 ))
echo $NUMBER
TEXT="The next number is, "
if (( NUMBER <= 15 ))
then
echo $TEXT B:$NUMBER
fi
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36 OPR/132.0.0.0
Challenge Information:
Bash Commands Review - Bash Commands Review
GitHub Link: https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/blocks/review-bash-commands/6724e387ee098d1ef33108ba.mdPreformatted text