Embarrassingly simple bash scripting help
The test command is definitely wrong.
Just remember "["
in bash is a command, not a syntax. It expects the string "]"
as the last argument. This is why spaces are required before and after them. (Semicolon is OK, because it is a part of the syntax)
Also, as Kerrek pointed out, the comparation operator is -lt
not lt
.