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

From: Chris Taylor <>
Date: Wed, 25 Sep 2013 11:55:27 -0500
Message-ID: <>

1. Bash script
2. Solaris 5.10
3. Building this to run from Control-M job scheduler tool
4. hide the username/password from the command line (from ps -Aef)
5. parallelize the $sqlfile commands - each command can run independently -
would like to do this through nohup
Variables $logfile, $v_user, $v_pass, $sqlfile are all defined before this (of course)

If I write the script like this, it works but in serial and I need parallel: /opt/app/oracle/product/9.2.0/bin/sqlplus -s << EOF >> $logfile $v_user/$v_pass
_at_$sqlfile $table_name

EOF If I write it like this it works in parallel *but* shows the uname/password on the ps line.
nohup /opt/app/oracle/product/9.2.0/bin/sqlplus -s $v_user/$v_pass
_at_$sqlfile $table_name >> $logfile &

I wanted to do something like:
nohup /opt/app/oracle/product/9.2.0/bin/sqlplus -s << EOF >> $logfile $v_user/$v_pass
_at_$sqlfile $table_name

EOF & --- but this all fouled up, so I'm trying to figure out how to nohup the SQLPLUS << EOF bit?

Basically I'd like to nohup that block command but can't quite figure the syntax out.
(My shell script is built so that it doesn't continue until all the sqlplus commands have finished and then it will cat the output and search for custom exception messages. If custom exception message exists, then it will exit with a failure message so that Control-M sees that it failed and also will have the cat'd output in the console log)

Is there a way to do a nohup in a loop so that the uname/password doesn't show up on the ps list? I thought about assigning it to a variable but that doesn't really work to hide the username password either.

Any thoughts? Email me if you want some clarification.

Thanks for any suggestions/help.


Received on Wed Sep 25 2013 - 18:55:27 CEST

Original text of this message