我试图杀死一个过程,在Ubuntu的外壳,其与像创建:杀死后台进程与壳牌在Ubuntu
#!/bin/bash
<!--There should be codes which can kill my app(run in the background)
echo "app will be run."
java -jar path/to/my/jar/file.jar /arguman/of/myApp.txt & << 'ENDAPP'
disown ENDAPP
我知道如何杀死曼努埃尔一个应用程序是这样的:
ps -ax -u | grep的APPNAME
,找到的ProcessID然后,
杀死[的ProcessID]
是否有可能呢?如果是的话,怎么样? 谢谢。
我需要一个bash脚本来杀死这个应用程序。 –