| From: Manuel Arostegui Ramirez <manuel@xxxxxxxxxxxxxx> | That was the script, well as you can see CURRENT_HOUR is being declared INSIDE | of the while loop, so....it was impossible to run if I didn't declare it | before the loop :-) When I write a shell script, I almost always start it with set -u -e The -u means: consider it an error to refer to an unset variable The -e means: terminate on a command failing This lets me catch my mistakes a lot earlier.