I have two script files running simultaneously. I just need to kill the java
process running in one script without affecting the java
process in the another one.
Take the 2-minute tour
×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
||||
Would kill the |
|||
|
There are many ways to implement it, to make it robust, to avoid race on temp files and etc.. but just that you are able to start with:
to make it better you could check if the file exist before to "cat it" with
|
|||||||||
|
runJavaApp &
then in the next linescr1javaAppId=$!
You can kill the running process usingkill -s 15 $scr1javaAppid
– val0x00ff yesterday