"while read" in a Shell Script and reading from a Variable