command1 && command2 && echo "OK" || echo "FAIL"
This will print OK
if both commands succeeded or FAIL
if either of commands failed.
How can I modify this to print:
OK
if both commands succeded,FAIL 1
ifcommand1
failed, andFAIL 2
ifcommand2
failed?