fix while AND logic from -a to &&, to avoid $1 expansion before testing $#