bash. execute one script from another and exit -


Can you please help me with the following:

I try to execute a script I am doing - test2 - using other script test1:

  bash -c "/ test2 -f $ (printf" /etc/test2.conf "" $ @ ")"  

Everything is fine The problem is that test2 script runs continuously and can not be interrupted and test1 script accordingly is also going on. It is unnecessary, test1 should be stopped. I need all from test1 script to execute the test2 script and to exit, I only want to work without cron or any similar utilities.

Thank you.

test1 is already a bass script, so it is not necessary to call bash. If test2 is executable (+ x is set) then it is a command and it can be used directly.

  / path / to / test2 -f $ (printf "/etc/test2.conf" "$ @") & Amp;   

Runs an ampersand command and it's running. Test1 is able to exit from then.


When you close the console, logout, and nohup fixes, a hangup will be terminated by the signal.

  Nohow / path / to / test2-F $ (printf "/etc/test2.conf" "$ @") & amp;  

Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -