The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-11-2008
racbern racbern is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 26
How to include RETURN KEY with Background process "&" in Shell Script

Hello All,

I am a newbie in Shell script programming, and maybe you can help me with my query.

I need to write a shell script (mntServer.ksh) that will start a background process and also to be able to run another script.

The mntServer.ksh script contains:

#!/bin/ksh
/home/test/bin/squishserver &
/home/test/bin/inst_feature_test.ksh

However, when I run the mntServer.ksh script, it seems to just hang when the squishserver & process is being started and it doesnt continue to execute the next command on the script which is inst_feature_test.ksh.

# ./mntServer.ksh
Port: 4322


If I execute the squishserver & in command prompt, I need to press enter to go back to command prompt.

Is there a way I can incorporate a Return key in the shell script so that I can successfully start the squishserver & command and all the succeeding commands after it?


Thanks a lot in advance.


racbern