. ~gmload/.profile export PATH=$PATH:/usr/local/sys.bin set +e if [ -z "$1" ] then echo "Unterverzeichnis Parameter fehlt!" exit fi subdir=$1 shift cd data if [ ! -d $subdir ] then echo "Unterverzeichnis $subdir nicht gefunden!" exit fi if [ ! -d ../log/$subdir ] then mkdir ../log/$subdir fi cd $subdir if [ -f *.gz ] then gzip -f -d *.gz fi if [ -f IT1.CTL ] then sqlldr parfile=../../bin/gmload.par control=IT1.CTL log=sqlldr.log $* unix2dosIT1.log rm IT1.CTL rm IT1.DAT rm sqlldr.log else if [ ! -f *.asc ] then echo "Keine asc oder IT1.CLT Dateien gefunden!" exit fi for ascfile in *.asc do sqlldr parfile=../../bin/gmload.par control=$ascfile log=$ascfile.lgx $* & done wait for ascfile in *.asc do unix2dos <$ascfile.lgx>$ascfile.log rm $ascfile rm $ascfile.lgx done fi tar -cf ../../log/$subdir/logs.tar * cd .. rm -rf $subdir cd .. gzip -f log/$subdir/logs.tar cd bin #./gmloadexec check.sql