We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Submitting shell script in background.

rintsp
rintsp asked
on
Medium Priority
286 Views
Last Modified: 2010-04-15
Hi

I have an application that requires to execute a shell script in the background.

For example, the user will select print report, which is a seperate process and is run from a K Shell script. I need a way of running that shell script in the background, without the screen waiting for the process to complete. i.e. fire and forget. The calling screen will supply the full path of the shell script.

Is there a simple way of acheiving this in C on HP-UX and on Windows?

Pete
Comment
Watch Question

Top Expert 2004

Commented:
Hi rintsp,
Redirect the output and use nohup:

nohup your_script > /dev/null 2>&1 &

Cheers,
Stefan
CERTIFIED EXPERT
Top Expert 2006
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Oops, sorry I should have closed this along time back, sunnycoder is the correct answer and points sorted!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.