On Friday 14 May 2010 21:44, Cristian Ionescu-Idbohrn wrote:
> On Fri, 14 May 2010, Denys Vlasenko wrote:
> 
> > I did discover a lot of interesting details about shells
> > while hacking on them. One is that bare "read"
> > is NOT the same thing as "read REPLY"! Look at this:
> >
> > $ echo "  foo  b\ar  " | { read -r; echo "[$REPLY]"; }
> > [  foo  b\ar  ]
> 
> $ dash -c 'echo "  foo  b\ar  " | { read -r; echo "[$REPLY]"; }'
> read: 1: arg count
> []

They are not bash compat :)

> > $ echo "  foo  b\ar  " | { read -r REPLY; echo "[$REPLY]"; }
> > [foo  b\ar]
> 
> $ dash -c 'echo "  foo  b\ar  " | { read -r REPLY; echo "[$REPLY]"; }'
> [foo  br]
> 
> (with a bell ringing)

Bug per http://www.opengroup.org/onlinepubs/009695399/utilities/read.html

-- 
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to