guys
i have written a very simple script .it runs manually well.
but when i put it in cron,it doesn't give the desired output.
script looks like this:
#! /usr/bin/sh
#script for loading data in table using ctl file/Abhijeet K/08.07.2006
/svm_wl1/. .profile
cd /svm_wl1/billing/data/server/log
rm SVM_WL1_WLN_DATA_USAGE.txt
a=`ls SVM_WL1_WLN_DATA_USAGE_2006*.txt`
echo "----------"
echo $a
echo "----------"
sleep 5
cp $a /svm_wl1/billing/data/server/archive/SVM_WL1_WLN_DATA_USAGE
echo $a > /svm_wl1/billing/data/server/log/test
b=`cut -b 1-22 /svm_wl1/billing/data/server/log/test`
echo "------------"
echo $b
echo "------------"
rm test
sleep 5
mv $a $b.txt
sqlldr <username>/<password>@<database_name> control=/svm_wl1/billing/data/server/log/DIA_USAGE.ctl log=/svm_wl1/billing/data/server/log/DIA_USAGE.log
echo "------"
echo "done"
echo "------"
date
echo "------"
If a run script manullay,data gets inserted in the table & a log file also gets generated but in cronjob script runs without insertion and log file generation.
i tried calling . .profile before the execution of script starts.
still no result.
any views/suggestions/corrections welcome
regards
abhijeet