
Ahora, antes de marcar esto como duplicado, comprenda que busqué este problema y ya probé todas las soluciones sin éxito.
Mi guión:
#!/bin/bash
echo "Enter the number 3"
read t1
if [$t1 -eq 3]; then
echo "it is 3"
elif [$t1 > 3]; then
echo "it is greater than 3"
fi
exit 0
El error que me sale es:
./g.sh: line 5: [3: command not found
./g.sh: line 7: [3: command not found
Respuesta1
espacios necesarios if [ $t1 -eq 3 ]