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
What is shell scripting?
write a shell script to check the failed jobs?
What is option in shell script?
What is a scripting language simple definition?
Is shell scripting easy to learn?
Is shell a scripting language?
What are the four fundamental components of every file system on linux?
Why is used in shell scripting?
What is the significance of $#?
What are "c" and "b" permission fields of a file?
How important is shell scripting?
What will happen to my current process when I execute a command using exec?
Can we run shell script in windows?
What is sed in shell script?
What is a shell script in windows?