Re: Bash "read" command: want to preload some data

2011-10-09 Thread au2by2
Apologies, line wrapping messed up my previous reply, corrected here (I hope). Won't this do what you want? It obviously works on "old" bash. echo -n "prompt:"; writevt -t `tty` -T "default"; read a; For example: testuser@bartlett:~$ echo -n "prompt:"; writevt -t `tty` -T "default"; read

Re: Re: Bash "read" command: want to preload some data

2011-10-09 Thread au2by2
Won't this do what you want? It obviously works on "old" bash. echo -n "prompt:"; writevt -t `tty` -T "default"; read a; For example: testuser@bartlett:~$ echo -n "prompt:"; writevt -t `tty` -T "default";\ > read a; declare -p a BASH_VERSION prompt:default declare -- a="default" declare --