Re: Need some simple help with nohupping a SQLplus script from within a BASH script

  • From: "Radoulov, Dimitre" <cichomitiko@xxxxxxxxx>
  • To: Chris Taylor <christopherdtaylor1994@xxxxxxxxx>
  • Date: Wed, 25 Sep 2013 20:44:35 +0200

On 25/09/2013 19:41, Chris Taylor wrote:
> Strange, that doesn't quite work for me but if I use the "&" instead 
> of "< /dev/null" then it works perfectly.
I used the explicit stdin redirection in my example just to avoid to hit 
enter twice to get the interactive prompt.
And yes, sorry, you should move the & to get the redirection working as 
you want.

> I thought I had I tried that and it didn't work but apparently I 
> didn't or I had the "&" in the wrong place in the script.
>
> This appears to be working like I wanted:
>
> nohup /opt/app/oracle/product/9.2.0/bin/sqlplus -s << EOF >> $logfile &
> [...]

You may need to redirect the standard error somewhere as well,
otherwise you may not be able to consult it later, when you run the 
script non-interactively.

Dimitre



--
//www.freelists.org/webpage/oracle-l


Other related posts: