greno wrote:
> How can the keyboard buffer be prefilled with an answer for a read command?
> I want to prompt the user with a question using the read command and then
> suggest an answer that they could backspace over and change if necessary.
default="Something or other"
history -s "$default"
read -ep "Press up arrow to edit \"$default\": " XX
--
Chris F.A. Johnson <http://cfaj.freeshell.org>
===================================================================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
.