how to call shell script (.ksh) file from another shell script
Clash Royale CLAN TAG#URR8PPP
up vote
-3
down vote
favorite
I am not able to call a shell script from another shell script.
I have written below code. The first script is getting executed (extract_trig_to_in.ksh
)
but the second one copy_to_dbload_path.ksh
is not getting executed.
sleep 2
. /opt/ontology/scripts/Green_DMS_Automation/sovan/c20_data_extraction_scripts/ksh/extract_trig_to_in.ksh
sleep 2
. /opt/ontology/scripts/Green_DMS_Automation/sovan/c20_data_extraction_scripts/ksh/copy_to_dbload_path.ksh
shell-script
add a comment |Â
up vote
-3
down vote
favorite
I am not able to call a shell script from another shell script.
I have written below code. The first script is getting executed (extract_trig_to_in.ksh
)
but the second one copy_to_dbload_path.ksh
is not getting executed.
sleep 2
. /opt/ontology/scripts/Green_DMS_Automation/sovan/c20_data_extraction_scripts/ksh/extract_trig_to_in.ksh
sleep 2
. /opt/ontology/scripts/Green_DMS_Automation/sovan/c20_data_extraction_scripts/ksh/copy_to_dbload_path.ksh
shell-script
1
Are you getting any error messages at all? Why is there no#!
-line in the code that you show? Is there any reason you're sourcing the scripts rather than running them normally? What do the two scripts do? Is the first script usingexit
at any point (which would exit the calling script as well since you're sourcing the script rather than running it normally).
â Kusalananda
Aug 21 at 11:45
All I see is you successfully running two scripts. (and some sleeping, is this relevant). What is in the scripts? What errors do you get? What are you expecting?
â ctrl-alt-delor
Sep 7 at 10:03
add a comment |Â
up vote
-3
down vote
favorite
up vote
-3
down vote
favorite
I am not able to call a shell script from another shell script.
I have written below code. The first script is getting executed (extract_trig_to_in.ksh
)
but the second one copy_to_dbload_path.ksh
is not getting executed.
sleep 2
. /opt/ontology/scripts/Green_DMS_Automation/sovan/c20_data_extraction_scripts/ksh/extract_trig_to_in.ksh
sleep 2
. /opt/ontology/scripts/Green_DMS_Automation/sovan/c20_data_extraction_scripts/ksh/copy_to_dbload_path.ksh
shell-script
I am not able to call a shell script from another shell script.
I have written below code. The first script is getting executed (extract_trig_to_in.ksh
)
but the second one copy_to_dbload_path.ksh
is not getting executed.
sleep 2
. /opt/ontology/scripts/Green_DMS_Automation/sovan/c20_data_extraction_scripts/ksh/extract_trig_to_in.ksh
sleep 2
. /opt/ontology/scripts/Green_DMS_Automation/sovan/c20_data_extraction_scripts/ksh/copy_to_dbload_path.ksh
shell-script
shell-script
edited Sep 7 at 9:59
Rui F Ribeiro
36.7k1271116
36.7k1271116
asked Aug 21 at 11:42
sovan
1
1
1
Are you getting any error messages at all? Why is there no#!
-line in the code that you show? Is there any reason you're sourcing the scripts rather than running them normally? What do the two scripts do? Is the first script usingexit
at any point (which would exit the calling script as well since you're sourcing the script rather than running it normally).
â Kusalananda
Aug 21 at 11:45
All I see is you successfully running two scripts. (and some sleeping, is this relevant). What is in the scripts? What errors do you get? What are you expecting?
â ctrl-alt-delor
Sep 7 at 10:03
add a comment |Â
1
Are you getting any error messages at all? Why is there no#!
-line in the code that you show? Is there any reason you're sourcing the scripts rather than running them normally? What do the two scripts do? Is the first script usingexit
at any point (which would exit the calling script as well since you're sourcing the script rather than running it normally).
â Kusalananda
Aug 21 at 11:45
All I see is you successfully running two scripts. (and some sleeping, is this relevant). What is in the scripts? What errors do you get? What are you expecting?
â ctrl-alt-delor
Sep 7 at 10:03
1
1
Are you getting any error messages at all? Why is there no
#!
-line in the code that you show? Is there any reason you're sourcing the scripts rather than running them normally? What do the two scripts do? Is the first script using exit
at any point (which would exit the calling script as well since you're sourcing the script rather than running it normally).â Kusalananda
Aug 21 at 11:45
Are you getting any error messages at all? Why is there no
#!
-line in the code that you show? Is there any reason you're sourcing the scripts rather than running them normally? What do the two scripts do? Is the first script using exit
at any point (which would exit the calling script as well since you're sourcing the script rather than running it normally).â Kusalananda
Aug 21 at 11:45
All I see is you successfully running two scripts. (and some sleeping, is this relevant). What is in the scripts? What errors do you get? What are you expecting?
â ctrl-alt-delor
Sep 7 at 10:03
All I see is you successfully running two scripts. (and some sleeping, is this relevant). What is in the scripts? What errors do you get? What are you expecting?
â ctrl-alt-delor
Sep 7 at 10:03
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
. Script.ksh
includes source of script into your one. And if there any "exit" command it will exit your script. Try to replace it with just /bin/ksh Script
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
. Script.ksh
includes source of script into your one. And if there any "exit" command it will exit your script. Try to replace it with just /bin/ksh Script
add a comment |Â
up vote
1
down vote
. Script.ksh
includes source of script into your one. And if there any "exit" command it will exit your script. Try to replace it with just /bin/ksh Script
add a comment |Â
up vote
1
down vote
up vote
1
down vote
. Script.ksh
includes source of script into your one. And if there any "exit" command it will exit your script. Try to replace it with just /bin/ksh Script
. Script.ksh
includes source of script into your one. And if there any "exit" command it will exit your script. Try to replace it with just /bin/ksh Script
answered Aug 21 at 11:46
Alexander
77913
77913
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f463840%2fhow-to-call-shell-script-ksh-file-from-another-shell-script%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Are you getting any error messages at all? Why is there no
#!
-line in the code that you show? Is there any reason you're sourcing the scripts rather than running them normally? What do the two scripts do? Is the first script usingexit
at any point (which would exit the calling script as well since you're sourcing the script rather than running it normally).â Kusalananda
Aug 21 at 11:45
All I see is you successfully running two scripts. (and some sleeping, is this relevant). What is in the scripts? What errors do you get? What are you expecting?
â ctrl-alt-delor
Sep 7 at 10:03