#!/usr/local/bin/perl -w # update_zoo_data_cache.pl # Runs defgb given the data files: # zoo_cubic_meter.ind # zoo_square_meter.ind # # in order to update the cache files for these data. The idea # that this is done during the early morning hours so as to minimize # interference with normal access to the database. # February 25, 1999 Bob Groman # March 1, 1999 Remove trainling blank from command string. Remove # redirection from here and do it via shell script. rcg $version="01Mar1999/1.01"; $tempfile="/tmp/update_zoo_data_cache.log"; if (-e $tempfile) { unlink $tempfile;} open TEMPFILE, ">$tempfile"; print TEMPFILE ("Program $0 \n\tVersion $version\n\n"); $command="/data5/globec/methods/defgb"; #$command="/usr/bin/cat"; #@filespec=("@/data/pgarrahan/dbaccess/zoo_cubic_meter.ind", # "@/data/pgarrahan/dbaccess/zoo_square_meter.ind"); #@filespec=("@/data/pgarrahan/dbaccess/zoo_raw_counts_short.ind"); @filespec=("@/data/pgarrahan/dbaccess/zoo_square_meter.ind"); foreach $entry (@filespec) { @args= ("$command", "$entry"); unless ( system(@args) == 0 ) { print TEMPFILE ("system @args failed: $?\n\n"); } else { print TEMPFILE ("Entry $entry successful\n"); } } close TEMPFILE; exit 0;