% mk_raw_flt.m - copies raw down files from shared disk and converts to
% .flt files
% this one for OCeanus oc415-2 eddies

%!\cp /sjdata/Proc-data/raw/dsj0112???.cnv ../cnv
%!chmod 644 ../cnv/*

% convert the files to .flt
!\ls -1 /mnt/oc415-2a/oc415_2/ctd/process/oc41522[5-9].cnv > tmp
fid = fopen('tmp','r');
str=fread(fid);
fclose(fid);
aa = find(str == 10); % find the <cr>
ind=1;
for ii = 1:length(aa)
  s1 = setstr(str(ind:aa(ii)-1))';
  s2 = strrep(s1,'.cnv','.flt');
  eval(['!mk_flt_cnv.pl ',s1,' > ',s2])
  ind = aa(ii)+1;
end
