#!/bin/bash

letters="0 1 2 3 4 5 6 7 8 9 a b c d e f"
node=$1
for letter1 in $letters; do
    for letter2 in $letters; do
	tableName=`echo Files_"$node"_"$letter1$letter2"`
	count=`echo "SELECT COUNT(*) FROM $tableName WHERE last_check='0000-00-00 00:00:00'" | mysql -u ippuser -pipp -h ippc11 FilesMonitoring | grep -v COUNT`
	if [ $count -gt 0 ]; then 
 	    echo "$tableName: "$count 
	   fi
    done
done
