Returning to shell from previous script

Found myself stuck on this seemingly trivial issue. I have this script which call other shell files to do their deeds. The shell files in turn call some other programs as well. My problem is that in two of these shell files, the control doesnt return to next command in script unless the Enter key is pressed.
Its somewhat like this :

#runprogs.sh
echo "Running Program one"
. ./program-one
echo "Running Program two"
. ./program-two

Now if I individually run program-one , it works fine (starts some services) and then I have to press Enter key after a while to get the prompt back. So when I run the above script, it gets stuck at program-one waiting for the keypress and program-two doesnt get fired. Any idea how to come out of program-one after the service has successfully been started ?

And program-two also requires some keypress from the console like program-one so I cant put program-two before program-one.

I am using KShell on HP Ux.

Thanks for your time :slight_smile:

You might get away with:

echo | . ./program-one

What services are you starting? What exactly does "program-one" and "program-two" ask for on the screen?

Actually it doesnt ask for anything. Program-one will initialize some variables and call some more scripts and run a program. Basically it keeps running but you can get back to shell when you press enter.

Lemme try with your suggestion. Thanks a lot :slight_smile:

[Edit] Okay I just researched the program-one. It assigns some variables and then runs an alias intstart which is assigned so :

alias intstart
intstart='cd $HOME/intserver && intserver'

This shell file intserver is the actual file which runs the service to which the users login to (a web based interface). Now when I run program-one, I do get the shell back, but then the intserver process takes over and shows its messages and I have to press Enter again to get shell back.

---------- Post updated at 07:45 PM ---------- Previous update was at 07:11 PM ----------

Hmmm .. So I added a sleep 5 after the alias is called and added a return and it seems to be working for program-one.

Now I have to fix program-two which internally calls scp and my prompt gets stuck after scp displays the privacy banner.