#!/bin/ksh # ---------------------------------------------- # author(s) : Edward Corrado, Eric Thul # title : makerss.ksh # date : 2005.09.10 # version : 0.1 # license : The Artistic License # http://www.perl.com/pub/a/language/misc/Artistic.html # # description : This script runs all SQL*Plus queries located in # /export/home/voyager/sql/rss that are designed to # create flat files of new library acquistions, and then # the script calls rss.pl to convert the flat files into # RSS 2.0 files. This script is normally ran via cron. # Set Oracle vars here . /export/home/voyager/.profile ORACLE_SID=LIBR ORAENV_ASK=NO . /usr/local/bin/oraenv USERNAME=foo PASSWORD=bar cd /export/home/voyager/sql/rss for subject in `ls *.sql` do echo "###########################################################" echo "Starting extract of data for $subject" /oracle/app/oracle/product/8.0.5/bin/sqlplus -s $USERNAME/$PASSWORD @/export/home/voyager/sql/rss/${subject} >> $subject.log echo $subject completed echo "###########################################################" done /export/home/voyager/rss/rss.pl /export/home/voyager/rss/rss-complete.ini echo "RSS Data Created" | mailx -s"RSS Data Created" corrado@tcnj.edu