#!/bin/csh if ($#argv == 0) then echo -n "Enter date (yyyymmdd): " set gdate = $< else set gdate=$argv[1] endif if (! -e $gdate) mkdir $gdate cd $gdate set fils = `rsh lilikoi "ls /work/ivm/$gdate/grams/IMGM*"` set fils=($fils `rsh lilikoi "ls /work/ivm/$gdate/grams/*.gif"`) set fils=($fils `rsh lilikoi "ls /work/ivm/$gdate/grams/rivm*"`) foreach afil ($fils) if (-e $afil:t) then echo $afil:t already here else echo Copying $afil:t if ($afil:e == "Z" || $afil:e == "gz" || $afil:e == "gif") then rcp -p lilikoi:$afil . else rsh lilikoi /usr/local/bin/gzip $afil rcp -p lilikoi:$afil.gz . endif endif end set fils = `rsh lilikoi "ls /work/ivm/$gdate/mosaic/IMGM*"` if ($#fils != 0) then if (! -e mosaic ) mkdir mosaic cd mosaic foreach afil ($fils) if (-e $afil:t) then echo $afil:t already here else echo Copying $afil:t if ($afil:e == "Z") then rcp -p lilikoi:$afil . else rsh lilikoi /usr/bin/compress $afil rcp -p lilikoi:$afil.Z . endif endif end endif