#! /bin/csh # process -- C Shell script to process eqpac mail # set oasis = /oasis set eqpac = $oasis/eqpac set bin = $oasis/bin set cfg = $eqpac/cfg set infile = eqpac.raw if ($#argv > 0) set infile = $1 cd $eqpac/raw set file1 = ep1.raw set file2 = ep2.raw set cfgfile1 = $cfg/ep1.cfg set cfgfile2 = $cfg/ep2.cfg if ( -e $infile.gz ) /usr/mbari/bin/gunzip $infile.gz # changed 10/23/00 for 2000 deployment (klh) #current #$bin/argfilter -n 11909 -n 11910 -a100100 <$infile >$file1 #$bin/argfilter -n 25979 -n 25980 -a100100 <$infile >$file2 #new Oct 00 $bin/argfilter -n 11911 -n 25978 -a100294 <$infile >$file1 $bin/argfilter -n 11909 -n 11910 -a100303 <$infile >$file2 # Note that we're erasing data files and re-extracting the entire set. # It turns out this is easier and faster than appending data to existing # files, and then sorting and merging the results. rm -f $eqpac/ep1/* >& /dev/null rm -f $eqpac/ep2/* >& /dev/null cp $eqpac/cfg/ep1/* $eqpac/ep1 >& /dev/null cp $eqpac/cfg/ep2/* $eqpac/ep2 >& /dev/null cd $eqpac/raw $bin/argextract -c $cfgfile1 $file1 $bin/argextract -c $cfgfile2 $file2 $bin/argos -c $cfgfile1 $file1 > $eqpac/ep1/data $bin/argos -c $cfgfile2 $file2 > $eqpac/ep2/data rm -f $file1 $file2 >& /dev/null cd $eqpac/ep1 mv argos argos.tmp sort argos.tmp | awk -f $eqpac/bin/argos.awk nmsgs=10 >argos rm -f argos.tmp cd $eqpac/ep2 mv argos argos.tmp sort argos.tmp | awk -f $eqpac/bin/argos.awk nmsgs=10 >argos rm -f argos.tmp