变量= $ 1 罐子= $ 16 ps -ef | grep -w $ {variable} | grep -w'org.apache.spark.deploy.SparkSubmit'| grep -w $ {jar}> t.txt sed -n 1p t.txt> t1.txt awk'{print $ 3}'t1.txt> kill.txt 读x时;做 kill -9 $ x echo进程Id $ x和应用程序“$ variable”被杀死 DONE