Aprende Bash Scripting construyendo cinco programas - Construye cinco programas

Cuéntanos qué está pasando:

volvi a hacer el curso pensando en que podria ser alguna otra falla pero llegue al mismo lugar y no puedo pasar la leccion:

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:.

Tu código hasta el momento

#!/bin/bash

# Bingo Number Generator

echo -e "\n~~ Bingo Number Generator ~~\n"

NUMBER=$(( RANDOM % 75 + 1 ))
TEXT="The next number is, "

echo $NUMBER
if (( NUMBER <= 15 ))
then
echo $TEXT B:$NUMBER
fi

Información de tu navegador:

El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36

Información del Desafío:

Aprende Bash Scripting construyendo cinco programas - Construye cinco programas

Hola @marianoasdf

Intente eliminar el “echo” encima de la declaración “if”.

Feliz codificación

1 Like

muchas gracias, era eso

1 Like