SQL Language (MOSC)

MOSC Banner

Passing back a simple value from sqlplus to shell script returns blank?

in SQL Language (MOSC) 10 commentsAnswered ✓

Anyone know why this simple script returns a blank value when run from a shell script?


VALUE=`sqlplus -s /nolog <<END

connect xxx/xxx@xxxx

set pagesize 0 feedback off verify off heading off echo off time off timing off

SELECT COUNT(*) FROM v$session

exit;

END`

echo $VALUE

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center