Unable to accept input during a script (bash "read")
I am having trouble with the read command. For some reason it is not accepting any input.
For example if I run it directly from the bash prompt as follows
then run the set command I can see that an environment variable named test has been created but it is blank.
Once the read command has exited the string I typed (123 in this example) is then output to the bash prompt resulting in a command not found error.
The same thing happens in a script. For example
echo "enter password"
Will echo nothing and then whatever I typed during the script will then be entered at the next prompt with a "command not found" error.
Any ideas? Its pretty hard to google for something like this since the word "read" is so common.