#! /bin/csh # copydata - C Shell script to copy decoded OASIS data from # /usr/local/oasis/M[1,2] to /ARCHIVE/oasis/aug92/m[1,2] set nonomatch set today = `date -u +%y%j` set download = /usr/local/oasis set archive = /ARCHIVE/oasis/1993-4 if ($#argv > 0) set today = $1 foreach name (adcp atlas ctd ctd2 error gps nitrate oasis oasis.m1b par specprr spectro) cd $download/M1/$name foreach file (9*) if ( $file == '9*' ) continue if ( $file < $today - 7 ) then mv $file $archive/m1/$name else cp $file $archive/m1/$name endif end end foreach name (atlas ctd error gps oasis par nitrate) cd $download/M2/$name foreach file (9*) if ( $file == '9*' ) continue if ( $file < $today - 7 ) then mv $file $archive/m2/$name else cp $file $archive/m2/$name endif end end