Hi, all Scripting professional.
Q. I have written script1.sh and calling script2.sh in
script1.sh file using bash shell as interpreter and my log
in shell also bash shell.My code like
Script1

#!/bin/bash
echo "My script2 call"
. script2.sh

Here script2.sh file run successfully but when I have
changed my interpreter bash to ksh like #!/bin/ksh
Error are comming script2.sh command not found. Guid me how
to call other script in our main script.

Answer Posted / deep

instead of

. script2.sh

Just try

sh script2.sh

It will Run

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a command sequence to find all the files modified in less than 2 days and print the record count of each.

939


What are the 3 standard streams in linux?

576


What is the best shell scripting language?

545


When should shell programming/scripting not be used?

598


What is gui scripting?

607






How to get the 3rd element/column from each line from a file?

700


How do I read a .sh file?

534


What is a boot block?

587


What is awk script?

550


How will you connect to a database server from linux?

557


How do you find out What is your shell?

592


What is the conditional statement in shell scripting?

661


how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com

2112


What are the zombie processes?

570


How do I run a script on mac?

573