![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Transfer file from local unix server to remote server | indira | Shell Programming and Scripting | 2 | 05-03-2007 07:35 AM |
| passing unix variable to sqlplus without a file name | sakthi.abdullah | UNIX for Advanced & Expert Users | 3 | 12-12-2006 06:35 AM |
| SQLPLUS from a remote server | chittari | Shell Programming and Scripting | 5 | 08-08-2006 03:37 AM |
| SSH key code versus server key code | Texan | Security | 1 | 04-12-2006 12:57 PM |
| Increase width of Spool file | handynas | UNIX for Dummies Questions & Answers | 2 | 11-20-2001 09:24 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
code to FTP the spool file from Sqlplus to the unix server.
I have a sqlplus report and inside that report I have the following piece of code to mail the report output to the email id.
My requirement is, instead of emailing the output I want to FTP that script to a different unix server (say ip as 10.10.1.1). How to modify this code to FTP the spool file to the unix server. IF :g_email_to IS NOT NULL THEN SELECT name INTO :g_dbname FROM v$database; :g_host_cmd := 'echo "sending email ..."; sync; sync; sync; '||'uuencode '||:g_spool_file||' '||:g_attach_file ||' | mailx -r "oraclefinancials_'||:g_dbname||'"'; :g_host_cmd2 := 'cat '||:g_spool_file||' >> '||:g_outfile; IF :g_prog_title IS NOT NULL THEN IF instr(:g_prog_title,' ') > 0 THEN v_quote := ''''; ELSE v_quote := NULL; END IF; :g_host_cmd := :g_host_cmd||' -s '||v_quote||:g_prog_title||v_quote; END IF; IF instr(:g_email_to,' ') > 0 THEN v_quote := ''''; ELSE v_quote := NULL; END IF; :g_host_cmd := :g_host_cmd||' '||v_quote||:g_email_to||v_quote||'; echo done'; ELSE :g_spool_file := NULL; :g_host_cmd := 'exit'; :g_host_cmd2 := 'exit'; END IF; |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|