Unix Shell - nohup (script1.ksh ; script2.ksh ) & doesn't work

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > April 2005 > nohup (script1.ksh ; script2.ksh ) & doesn't work





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author nohup (script1.ksh ; script2.ksh ) & doesn't work
Michael A

2005-04-23, 5:51 pm

hi,

I am trying to start 2 processes , one after the other but
nohup (script1.ksh ; script2.ksh ) & doesn't work.

man nohup indicates that It should work and I know how to bypass this
problem , I am just wondering why it doesn't work.

thanks
Michael

Chris F.A. Johnson

2005-04-23, 5:51 pm

On Sat, 23 Apr 2005 at 21:12 GMT, Michael A wrote:
> hi,
>
> I am trying to start 2 processes , one after the other but
> nohup (script1.ksh ; script2.ksh ) & doesn't work.
>
> man nohup indicates that It should work and I know how to bypass this
> problem , I am just wondering why it doesn't work.


'(' is not a command.

NAME
nohup - run a command immune to hangups, with output to a non-tty

SYNOPSIS
nohup COMMAND [ARG]...

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
========================================
==========================
Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress
<http://www.torfree.net/~chris/books/ssr.html>
Michael A

2005-04-23, 5:51 pm

hi ,
according to man nohup : "
Be careful to place punctuation properly. For example, in the command
form: nohup command1; command2
nohup applies only to command1. To correct the problem, use the
command form: nohup (command1; command2)
"

thanks
Michael

Stephane CHAZELAS

2005-04-24, 2:46 pm

2005-04-23, 14:56(-07), Michael A:
> hi ,
> according to man nohup : "
> Be careful to place punctuation properly. For example, in the command
> form: nohup command1; command2
> nohup applies only to command1. To correct the problem, use the
> command form: nohup (command1; command2)
> "

[...]

That man page must refer to the nohup built into the csh or tcsh
shells. As "(" is a shell construct, of course /usr/bin/nohup
can't cope with it.

If your shell doesn't have a built-in nohup, you need

nohup sh -c 'command1; exec command2'

--
Stéphane
Stephane CHAZELAS

2005-04-27, 2:48 am

2005-04-23, 14:56(-07), Michael A:
> hi ,
> according to man nohup : "
> Be careful to place punctuation properly. For example, in the command
> form: nohup command1; command2
> nohup applies only to command1. To correct the problem, use the
> command form: nohup (command1; command2)
> "

[...]

That man page must refer to the nohup built into the csh or tcsh
shells. As "(" is a shell construct, of course /usr/bin/nohup
can't cope with it.

If your shell doesn't have a built-in nohup, you need

nohup sh -c 'command1; exec command2'

--
Stéphane
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com