我試圖殺死一個過程,在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腳本來殺死這個應用程序。 –