I know how to have a bash script prompt a user and save it in a variable.
Code:
#!/bin/sh
echo -n "Please enter your name: "
read $NAME
The question is how to do so with a timeout period (let's say 5 seconds), after which the variable can receive some default value.
Thanks for any suggestions.