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

You can do like this

#!/bin/ksh
/home/test/bin/squishserver > /dev/null 2>&1 &
/home/test/bin/inst_feature_test.ksh

Redirecting the output of squishserver to the desired output files. Can be /dev/null or any other output file you can give.

I hope that will help.

Sanjay