Nov 10, 2018

How to run multiple linux commands in one line

If you want to run each command only if the previous one succeeded, then combine them using the && operator:

$ export JAVA_HOME=/d/Downloads/jdk1.7.0_67/ && mvn clean appengine:update
If one of the previous commands fails, then all other commands following it won't be executed.

If you want to execute all commands regardless of whether the previous ones failed or not, separate them with semicolons:

$ mvn clean; mvn install