I’m looking to be able to always execute both validateA and validateB:
function validateA() {
echo "A [ok]"
return 0
}
function validateB() {
echo "B [ok]"
return 0
}
if ! validateA | ! validateB; then
echo "validation [fail]"
exit 1
else
echo "validation [ok]"
exit 0
fi
You can just call them regardless and capture the return values:
This outputs: