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

From: Radoulov, Dimitre <cichomitiko_at_gmail.com>
Date: Wed, 25 Sep 2013 20:44:35 +0200
Message-ID: <52432F13.20502_at_gmail.com>



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

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Sep 25 2013 - 20:44:35 CEST

Original text of this message