#!/bin/sh
DIR1=/var/www/temp1/
DIR2=/var/www/process/
if [ $# -ne '1' ] ; then
echo "Usage $0 <filename>";
exit;
elsif [ ! -e "$DIR2/$1" ]; then
echo "The filename you provided $1 does not exist in $DIR2"
exit;
fi
filename="$DIR2/$1"
outputfile="file1.dat"
Now I manually run:
$cd $DIR2
bzip2 -cd < $filename > $outputfile
$./my_cron.cron
$sqlplus mylogin/mypwd@myserver.com/SOMETHING <<ENDOFSQL
create or replace procedure my_prod as
begin
declare
db_package.db_proc1($filename);
end;
end load_con;
exec DBMS_SCHEDULER.RUN_JOB('MY_JOB', FALSE);
exit;
ENDOFSQL