![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need to write a script in UNIX to find a file if another file exists | mmdawg | Shell Programming and Scripting | 1 | 05-04-2008 11:40 PM |
| unix script to takes the old data from a TXT file and compress them into new file | vpandey | Shell Programming and Scripting | 2 | 03-05-2008 11:10 AM |
| Shell Script to Load data into the database using a .csv file and .ctl file | Csmani | Shell Programming and Scripting | 3 | 05-24-2006 09:09 AM |
| how to find Script file location inside script | asami | Shell Programming and Scripting | 10 | 03-15-2006 12:57 AM |
| Reading file names from a file and executing the relative file from shell script | anushilrai | Shell Programming and Scripting | 4 | 03-10-2006 05:25 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Log file for a Script
Oracle92 on solaris 8.
We have a Truncate Script that runs every night to cleanup certain tables , so new data gets loaded into. This Script is run in Unix Shell script where i set Environment varibles, and things like that.. Now, how do i create a log file of the script , to see weather the script really deleted the data ? ========================== #!/bin/ksh ORACLE_BASE=/u10/app/ORACLE ORACLE_DOC=$ORACLE_BASE/doc ORACLE_HOME=$ORACLE_BASE/product/9.2.0.1.0 ORACLE_SID=dss PATH=/usr/bin:/usr/ucb:/usr/sbin:/etc:/usr/inform/PowerMart:/usr/inform/RepServer:/usr/inform/scripts:$ORACLE_HOME/bin:/usr/bin:/bin:/usr/ccs/bin:/usr/ucb:/etc:/usr/openwin/bin:/usr/local/bin:. TNS_ADMIN=$ORACLE_HOME/network/admin LD_LIBRARY_PATH=/usr/inform/PowerMart:/usr/inform/RepServer:$ORACLE_HOME/lib32 export PATH PM_HOME ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH TNS_ADMIN export PARMS=/usr/inform/scripts/WorkFlow/dss_parms ORADBUSER=`cat $PARMS |grep ORADBUSER|cut -d":" -f2` ORADBPASSWD=`cat $PARMS |grep ORADBPASSWD|cut -d":" -f2` $ORACLE_HOME/bin/sqlplus -s << EOF $ORADBUSER/$ORADBPASSWD set heading off; set feedback off; set echo off; truncate table current_year; commit; ============================= Thanks Ron |
|
||||
|
Dear
if you are runnning the script from crontab,then the output will be mailed to the owner user. also you can put the script output in one file and the error in another one as below your_script.sh > outfile 2> errfile Regards; TheEngineer IBM Certified Specialist |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|