The UNIX and Linux Forums  

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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to include slashes "/" in @ARGV (Perl) umen Shell Programming and Scripting 5 04-07-2009 02:37 PM
passing a list of dynamic names to a "PS" command in shell script? sachin.tendulka Shell Programming and Scripting 3 11-21-2007 04:18 AM
Q: Recording shell script screen output using "script" command ? lalfonso.gomez Shell Programming and Scripting 4 01-18-2007 09:31 PM
No utpmx entry: you must exec "login" from lowest level "shell" peterpan UNIX for Dummies Questions & Answers 0 01-18-2006 04:15 AM
My "Bread and Butter" Process Keep Alive Perl Script.... Neo Tips and Tutorials 0 01-08-2005 05:17 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #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
  #2 (permalink)  
Old 03-11-2008
sanjaypraj sanjaypraj is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 7
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:33 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0