I want to run the command mvn clean in a bash script. But I want to put it in an if statement. If the clean does not run properly I would like to exit out of the bash script wit
No parentheses needed for checking the exit status:
if mvn clean ; then echo ok else echo Something went wrong. exit 1 fi