#!/bin/bash

startAt=$1

LOGFILE="/export/`hostname`.0/schastel/logs/`hostname`_refresh.log"
mkdir -p `dirname $LOGFILE`
letters="0 1 2 3 4 5 6 7 8 9 a b c d e f"
for letter1 in $letters; do
    for letter2 in $letters; do
	current=$letter1$letter2
	echo $current >> $LOGFILE
	if [[ "$startAt" > "$current" ]];	then
	    echo "Table: $letter1$letter2 ignored" >> $LOGFILE
	else
	    $HOME/dev/FilesMonitoring/refresh_table.py $letter1$letter2 >> $LOGFILE 2>>$LOGFILE
	fi
    done
done

