Quote:
Originally Posted by
woodson2
I'm having an issue with bash read input when using a case statement.
The script halts and doesn't read the input on the first loop.
There is just one loop, and it looks like the first read (outside the loop) has completed accepting the preset value "8hrs" as <return> was hit.
Quote:
if I hit enter then the scripts starts to respond as expected.
. . .
Which is the correct behaviour of
read - read a line terminated by a return character.
Quote:
script sits here and doesn't read the given defaultans above.
There are no modifiers / options for this (second)
read - no default value, no timeout value, no char count - so, yes, it sits there and waits for your input, terminated by a <Return>.