I'm trying to create a script on bash shell, containing 4 python scripts, I have sorted them in order to execute them sequentially, how do I make a condition if anyone of them not executed or returned any error then stop the shell
#!/bin/bash -x
cd /home/hadoop/Traffic_Stat_Process
python3 Table_Dropper.py
/usr/bin/spark-submit --jars /home/hadoop/vertica/lib/vertica-jdbc-9.1.1-0.jar Spark_JDBC_Connector.py
hadoop fs -rm -r /hadoopData/hive/warehouse/temp
python3 2th_phase.py
python3 3th_phase.py