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
Write a command sequence to find all the files modified in less than 2 days and print the record count of each.
What are the 3 standard streams in linux?
What is the best shell scripting language?
When should shell programming/scripting not be used?
What is gui scripting?
How to get the 3rd element/column from each line from a file?
How do I read a .sh file?
What is a boot block?
What is awk script?
How will you connect to a database server from linux?
How do you find out What is your shell?
What is the conditional statement in shell scripting?
how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com
What are the zombie processes?
How do I run a script on mac?