#!/bin/csh

mkdir /archive/garner/campaigns/yolo2005/rinex
mkdir /archive/garner/campaigns/yolo2005/rinex/obs
mkdir /archive/garner/campaigns/yolo2005/rinex/obs/2005
mkdir /archive/garner/campaigns/yolo2005/rinex/nav
mkdir /archive/garner/campaigns/yolo2005/rinex/nav/2005
cd /archive/garner/campaigns/yolo2005/raw/2005
foreach day ( ??? )
 mkdir /archive/garner/campaigns/yolo2005/rinex/obs/2005/${day}
 mkdir /archive/garner/campaigns/yolo2005/rinex/nav/2005/${day}
 cd $day
 foreach file (*.DAT)
  /shared/scripts/bin/archive/dbRinexGeodeticOccupation.pl -v -f $file -campaign_code YOLO2005 
  compress *05o *05n
  mv *05o.Z /archive/garner/campaigns/yolo2005/rinex/obs/2005/${day}/
  mv *05n.Z /archive/garner/campaigns/yolo2005/rinex/nav/2005/${day}/
 end
 cd ..
end
