awips2/deltaScripts/14.3.1/DR2864/subsetRelocator.sh
Richard Peter 46a94c88cd Issue #2854: Reorganize deltaScripts
Former-commit-id: c8e373c098 [formerly 56745c942e [formerly 469c2c597b80fd725f474e0d645656e4054fd69a]]
Former-commit-id: 56745c942e
Former-commit-id: 09f41a6b31
2014-04-30 13:03:44 -05:00

43 lines
789 B
Bash

#!/bin/bash
# DR 2864 - update the location of saved subset files
echo "Updating saved subset file locations"
startDir=/awips2/edex/data/utility/cave_static/user
cd $startDir
users=$(ls -1)
for i in $users
do
cd $i
if [ -e dataDelivery/subset ]
then
cd dataDelivery/subset
if [ ! -e GRID ]
then
mkdir GRID
fi
if [ ! -e POINT ]
then
mkdir POINT
fi
gridFiles=$(grep providerName *.xml | grep NOMADS | cut -d: -f1)
pointFiles=$(grep providerName *.xml | grep MADIS | cut -d: -f1)
for j in $gridFiles
do
mv $j* GRID
done
for j in $pointFiles
do
mv $j* POINT
done
fi
cd $startDir
done
echo "Update complete"