![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Accessing PL/SQL OUT variables in Korn Shell Script | bright_future | UNIX for Advanced & Expert Users | 4 | 1 Day Ago 09:02 AM |
| Accessing Shell Variables in awk or sed | nasersh | Shell Programming and Scripting | 3 | 05-05-2008 04:44 AM |
| Accessing Variables from .conf file | wayne1411 | Shell Programming and Scripting | 7 | 01-30-2008 01:30 PM |
| accessing ksh variables from awk | trupti wagh | Shell Programming and Scripting | 1 | 02-26-2007 01:11 AM |
| accessing variables declared in another perl script | gurukottur | Shell Programming and Scripting | 3 | 11-09-2006 06:22 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
accessing unix variables in oracle
Hi,
consider the following script. ip='***.***.**.**' user='****' pw='******' ftpresults=`ftp -nv $ip<<EOF user $user $pw cd /home/oracle/practice size $1 bye EOF` fname=$1 echo $ftpresults sqlplus -s tms/tms@dev45 <<"EOF" insert into remote_file_sizes (file_name,file_size) values ($fname,$ftpresults); commit; EOF In the above script i am getting the size of a remote file through and i am inserting it into oracle table. But i am not able to access the filename($fname)and filesize ($ftpresults) in insert statement. can anybody tell me how to access these unix variables in oracle insert statement. cheers RRK |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
'man ksh' yields the foowing for the 'here-document':
Code:
<< [-]word
The shell input is read up to a line that is the same
as word, or to an EOF. No parameter substitution, com-
mand substitution, or file name generation is per-
formed on word. The resulting document, called a
here-document, becomes the standard input. If any
character of word is quoted, no interpretation is
placed upon the characters of the document. Otherwise,
parameter and command substitution occur, \NEWLINE is
ignored, and \ must be used to quote the characters \,
$, `, and the first character of word. If - is
appended to <<, then all leading tabs are stripped
from word and from the document.
|
||||
| Google The UNIX and Linux Forums |