$?
The last command's exit status: zero is good silence.
Every command ends with a number: zero for success, another value for each species of failure. $? holds the one from the last foreground command.
It is ephemeral — the next command overwrites it, including a curious echo. In scripts it rarely shows: if, && and || read it under the table.
$ grep rainha vazio.txt
$ echo $?
1
$ grep operaria colmeia.txt
operaria: 40 mil por colmeia
$ echo $?
0