The shell has an eerie set of syntax alternatives for conditionals.
The [ is not a traditional delimiter, but the name of a command. The way to use it for multiple expressions is like this:
Code:
if [ "$h" -gt 9 ] && [ "$h" -lt 21 ]; then
...
fi
A slightly newer (that is, post-1979 or so ...) syntax is
Code:
if [ "$h" -gt 9 -a "$h" -lt 21 ]; then
...
fi
The $((...)) syntax is much newer, and introduces proper arithmetic (including the > and < operators) but is not directly usable as a condition. It simply expands to 0 for false and 1 for true. But of course, you can mix and match:
Code:
if [ $((h > 9 && h < 21)) == 1 ]; then
...
fi
Finally, there is the [[ ... ]] conditional, which is probably what you are after:
Code:
if [[ $h > 9 ]] && [[ $h < 21 ]]; then
...
fi
The characters which make up the [[ delimiter cannot be separated by whitespace (to the best of my knowledge).