[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: read -e allows execution of commands (edit-and-execute-command) as t
Re: read -e allows execution of commands (edit-and-execute-command) as the shell's process user
Mon, 29 May 2017 11:37:00 -0500
On Mon, May 29, 2017 at 12:29:16AM -0400, George Caswell wrote:
> Bash's builtin function "read" has one simple job: read data, return
> it to the caller. There shouldn't be anything in there about executing
> Why does read even need a function like this? Is it something that was
> useful in the days before job control? ##SELECTION_END##
The -e flag causes read to use GNU Readline if the input comes from a
terminal. This is *very* useful, since Readline allows you to perform
text manipulation functions, completion, advanced cursor movement, etc.
Also, the likelyhood of this being a real security issue is very small.