LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem in executing a shell script (https://www.linuxquestions.org/questions/linux-newbie-8/problem-in-executing-a-shell-script-727045/)

ursvmg 05-19-2009 08:55 AM

Problem in executing a shell script
 
Hi..
I'm new to shell scripting.
I have a shell script which would call few other shell scripts.

Code:

#!/usr/local/bin/tcsh -f
exec build_bb -c
echo 'Hello'
exec build_bb -l
echo 'Hello1'

This piece of code is not working fine.

When i execute this script, it properly executes the first exec (build_bb -c). After then it is not executing the remaining commands. It simply comes out of the script and return to the command prompt.

But when i execute the exec command individually (after commenting the other exec command ) it is working fine.

Could any one please check if there is any issue in my script.

nuwen52 05-19-2009 09:35 AM

Well, I don't do a lot of scripting in tcsh, mostly in sh. But, do you need the exec's to run an external program?


All times are GMT -5. The time now is 02:23 AM.