I want to run a command and compare the result the command produces to another value, and then either echo 0 or 1.
For example (in pseudocode) something along the lines of:
if ($(app --version) == "1.2.3") then echo 1" else echo "0"
Preferably the actual command output from app --version would be suppressed so that only 0 or 1 is written to stdout, depending on the result.
How can I do this with bash? Is there a quick one liner for that?