bug-bash
[Top][All Lists]
Advanced

[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


From: dualbus
Subject: Re: read -e allows execution of commands (edit-and-execute-command) as the shell's process user
Date: Mon, 29 May 2017 11:37:00 -0500
User-agent: NeoMutt/20170113 (1.7.2)

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
> commands.
> 
> 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.

--
Eduardo Bustamante
https://dualbus.me/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]