#!/bin/bash # #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # # This script reorders the gif files, placing the most recent file on # the top of the stack # # The calling script sequence is: # # ~cpcsat/web_plots/global.bash # ~cpcsat/mcidas/scripts/cron/mcdsgb-4km+1strunsat-image-inventory-rot_update.bash # CRON entry at ~cpcsat/cron/cron_job # #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # . ~cpcsat/.aliases_ir # dir=$MAIN_DIR/web_plots # number=167 while [ $number -ge 1 ] do new_num=$(($number+1)) mv $dir/gif/global_$number.gif $dir/gif/global_$new_num.gif number=$(($number-1)) done mv $dir/gif/global.gif $dir/gif/global_1.gif # exit