2

This question already has an answer here:

I tried to write my first bash script, so I have a question. I tried to google it, but found nothing.

I collected some data from user with read command. read creates empty line for user input. But what if I want to make prefilled line?

For example, part of my script:

printf "${WONWARN} Please enter user dial plan ${NORMAL} %s\\n" "$Number"
read -rp "For example, 'test'> " Number; echo

I have default dial plan named "default", and in very rare case it must be changed to other plan. I want to make prefill input line with "default", so user can just press enter without any typing (or delete this "default" and input their custom dial plan name).

marked as duplicate by muru, Sundeep, Archemar, Philippos, Jeff Schaller Dec 8 '17 at 11:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.