1835399 Members
2596 Online
110078 Solutions
New Discussion

nohup question

 
SOLVED
Go to solution
intp
Frequent Advisor

nohup question

nohup credit_bal.sh $1 & > crbal_status.log

on executing above statement , i get a message "Output will be sent to nohup.out"
and expects user input ( meaning enter key or any key press). But job runs in background.

How to eliminate this message ? when i execute the aboe the statement it should start the job in background and return to prompt without showing any message.

HELP..thanks.
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: nohup question

nohup credit_bal.sh $1 > crbal_status.log &

If input is expected then you also need to redirect stdin.

If it ain't broke, I can fix that.
Torsten.
Acclaimed Contributor

Re: nohup question

You should re-direct the error channel too, like

# nohup credit_bal.sh $1 1>crbal_status.log &

the messages "Output will be sent to nohup.out" is now in crbal_status.log, the output of your command is in nohup.out.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Torsten.
Acclaimed Contributor

Re: nohup question

# nohup credit_bal.sh $1 2>crbal_status.log &


of course.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
intp
Frequent Advisor

Re: nohup question

Thank you all. worked.