#!/usr/local/bin/perl 
#-- -*-perl-*-
@dirs=("7jdu","bccu-iss","bnta","bxmc","bxmc-iss","fita","jdss","malaita","vjjf","vjjf-res","wsd7079","wtec","wus9293");

open(ZSH,"|zsh") || die $!;

foreach $dir (@dirs) {
#`cd $i/netcdf`;

#`/bin/rm *.nc`;
$name=uc $dir;
if ($dir=~/iss/) {
  ($name=(uc $` ). "iss")=~s/\-/\./g;
}elsif ($dir=~/-res/) {
  $name=(uc $`)."res";
}elsif ($dir eq 'malaita') {
  $name='Malaita';
}
$|=1;
print "$name\n";
print ZSH "
cd $dir/netcdf
/bin/rm *.nc
cp /woce3/togadat/pub_final/rv/$name/*.nc .
cd ../ascii
/bin/rm *.gz
cp /woce3/togadat/pub_final/rv/$name/*.asc .
gzip *.asc
cd ../../
";
}
close(ZSH);
