oxy_linkscript_jr302 784 Bytes
Newer Older
Yvonne Firing's avatar
Yvonne Firing committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
#!/bin/csh -f
#
#Script by BAK on cruise jc032 to create symbolic links.
#Modified by BGW for cruise di346
#Modified by CPA to import oxygen files from /Drobo 
#The assumption is that the raw files are named
#in a way that identifies the instrument, eg
# ctd_jc032_001_ctm.cnv
#
#
# The initial foreach command will need to be modified for each cruise.
#cd data
#cd ctd
# modded bak di368
# modded bak jr302 8 jun 2014 to use rsync
cd
cd cruise/data
cd ctd
cd BOTTLE_OXY 

rsync -av jcrfs_oxy/* .



foreach i (`ls JR302OXY???.csv`)
#echo $i
set num = `echo $i | awk '{print substr($1,9,3)}'`
set cruise = 'jr302'
#echo $num

set linkfile = oxy_${cruise}_${num}.csv
#echo $linkfile

if (! -e $linkfile) then
  echo Making link $linkfile for raw file $i
  ln -s $i $linkfile
endif
end