#!/bin/bash #This script sets up a directory full of symbolic links to the # MMCRMom.nc and Health.txt files in the archive. #The directory will then be the target for a different script # that sends these data files to Boulder when bandwidth permits. # #Matthew Shupe #August 10, 2005 #Set the path export PATH=$HOME/bin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin linkdata() { inbasedir=$1 outbasedir=$2 instr=$3 ext=$4 echo " "link data to "$outbasedir" cd "$inbasedir"/"$instr" if havefiles $ext then echo " "linking data to "$outbasedir" for f in *"$ext" do ln -s /data/search/"$instr"/"$f" "$outbasedir"/"$f" done fi } echo " Start LinkData.bash `date -u`" linkdata $HOME/search/work $HOME/search/ToBoulder/data mmcr/mom nc.zip linkdata $HOME/search/work $HOME/search/ToBoulder/data mmcr/mom Health.txt #Add other data streams here if they should be added to the # data stream going to Boulder echo " Stop LinkData.bash `date -u`"