On Fri, May 31, 2013 at 1:12 PM, Teske, Devin <devin.te...@fisglobal.com>wrote:

>
> If you're arguing we have to change sh's behavior to be more compliant,
> jilles already quoted XCU 2.12 (our shell is well within its right to run
> any/all lvalue/rvalue operands of a pipe in a sub-shell without
> contradicting the guidelines).
>
> But if you're arguing that it has to change to make things better or
> easier… I don't know about that. Might just make people lulled into using a
> style that's non-portable. I'd like to keep things the way they are so that
> if you program for FreeBSD, you're inherently going to program in a fashion
> that is more portable.
> --
> Devin
>

FWIW bash (invoked as sh) on RHEL-based linux systems exhibits the same
behavior-

sh-3.2$ var=1
sh-3.2$ yes|var=2
sh-3.2$ echo $var
1
sh-3.2$

If my opinion matters at all, I would agree that for the sake of
portability that behavior be consistent with the majority of sh
implementations rather than "right" according to arbitrary ruling.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to