Home » Infrastructure » Unix » Accessing bind variables in the UNIX (Unix solaris)
Accessing bind variables in the UNIX [message #648417] Tue, 23 February 2016 04:19 Go to next message
Messages: 451
Registered: May 2008
Senior Member

I've couple of bind variables which hold file names, can you please suggest if there is a way to access these bind variables in the unix

I can think of ways using here (<EOF) document but is there a way without using here documents.

Re: Accessing bind variables in the UNIX [message #648425 is a reply to message #648417] Tue, 23 February 2016 05:22 Go to previous message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

The only way it to make them output in SQL*Plus.
Something like:
$ myvar=`sqlplus <<EOF
set heading on feedback off echo off pagesize 1000 lines 32767 trimout on verify off termout on tab off
select 1 from dual;
select 2 from dual;
$ var1=`echo $myvar | head -1`
$ var2=`echo $myvar | head -2 | tail -1`

Previous Topic: Hide files from underprivileged users
Next Topic: Please help me in using case sensitive command
Goto Forum:

Current Time: Wed Apr 24 10:40:34 CDT 2024