Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / jitesh varshney

write code like this :

#!/bin/bash
echo "My script2 call"
/bin/bash ./script2.sh [ or /bin/ksh ./script2.sh ]

It will run ..... enjoy !!!!!!

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

one folder contains lot of students name but I want to fetch hello with every student name individually using shell script

947


What is shell company all about?

969


How can we find the process name from its process id?

1166


How do I edit a .sh file?

1133


Given a file find the count of lines containing the word "abc".

1546


What is sudo command?

1042


What is the difference between grep and egrep?

1129


What is mac default shell?

1086


How are shells born?

956


What is console line?

956


What is a shell script? Can you name some of its advantages?

1047


How do I debug a shell script?

1065


What is the equivalent of a file shortcut that we have a window on a linux system?

1112


How do I open the shell prompt?

1184


When should shell programming/scripting not be used?

1133