具体脚本
#/bin/sh #LANG=zh_CN.utf8 #export LANG export SPARK_KAFKA_VERSION=0.10 export LANG=zh_CN.UTF-8
# export env variable
if [ -f ~/.bash_profile ];
then
source ~/.bash_profile
fi
source /etc/profile
myAppName='SPARK APP NAME' apps='' for app in `yarn application -list` do apps=${app},$apps done apps=${apps%?} if [[ $apps =~ $myAppName ]] then echo "included" else echo "not included,do submit...." ./submit_x1_x2.sh abc TestRestartDriver fi