I may be wrong, but I think `==` checks for string equality. Using `if [ $# -eq 0 ]` should be better.