Re: BUG: echo builtin does not handle -- arguments

2010-11-22 Thread Chet Ramey
On 11/22/10 3:33 AM, Марк Коренберг wrote: > It will be nice if I cat write > echo -- "$i" > as many tool, such as grep, use. Posix specifically says that echo does not honor `--'. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hip

Re: BUG: echo builtin does not handle -- arguments

2010-11-22 Thread Pierre Gaston
On Mon, Nov 22, 2010 at 10:33 AM, Марк Коренберг wrote: > in latest bash: > > suppose script: > > for i in "${filenam...@]}"; do >    echo "$i" > done > > if malicious user give file name "-e", empty string will be emitted to > stdout, but string "-e" should. > > It will be nice if I cat write > e