First bash script:
./second #takes too long
I want to kill the bash script first, and the second bash script is still running.
Can I do it?
UPDATE
The script first runs cronjob!
If the last thing the first script does is call the second script, then do the following:
exec ./second
which replaces the first script process with the second.
otherwise
nohup ./second & disown
For Linux, you should use the kill command after receiving the PID of the program you want to exit -
http://linux.about.com/library/cmd/blcmdl_kill.htm
I do not know how you could get the PID automatically through a script.
, "pkill" -
Ex -
pkill -9 ping
killall -
killall firefox
https://www.digitalocean.com/community/tutorials/how-to-use-ps-kill-and-nice-to-manage-processes-in-linux
BATCH, bash. .
, PID. -
taskkill /f /im "x"
"x" - , , .
, -
/im ImageName: , . (*), .
/f: , . ; .
- http://technet.microsoft.com/en-us/library/bb491009.aspx
Source: https://habr.com/ru/post/1568810/More articles:Read the file line by line and replace the regex - c #Extremely large single line file. - stringJava Swing: consumption of key events - javaHow to check DropDown status (shown or hidden) in autoCompleteTextView? - androidprohibition of actions - androidКак структурировать ответ с массивом, который имеет href для себя в YAML/swagger.io? - rest"No. - rSOAP KeyInfo Values - javaAdding a KeyInfo link in a SOAP request - c #How to change dll folder location? - dllAll Articles