Use quotes around $i please to reduce the chance of shell interpretation of the value.