Date: Tue, 28 May 2013 10:07:58 -0500 From: Reid Linnemann <linnemannr@gmail.com> To: Ryan Stone <rysto32@gmail.com> Cc: rank1seeker@gmail.com, FreeBSD Hackers <hackers@freebsd.org> Subject: Re: /bin/sh => STDIN & functions, var scope messing Message-ID: <47252E1F-0965-4772-AE40-865BE5D05CD8@gmail.com> In-Reply-To: <CAFMmRNz8p4t=PEstsy5itKYPUiJzo5_48L9sJWQxWjWrXcpDmg@mail.gmail.com> References: <20130527.194235.693.1@DOMY-PC> <CA%2B0MdpOcz7aw03HCrbxZVt1cnWdR4shqWaEfBrQkCpPnbgXLPQ@mail.gmail.com> <CAKw7uVjty2cJXT_QmexxKdRQyiKoHYMK1E-TjSHa5TCX1S8Bbg@mail.gmail.com> <CAFMmRNz8p4t=PEstsy5itKYPUiJzo5_48L9sJWQxWjWrXcpDmg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On May 28, 2013, at 7:00 AM, Ryan Stone <rysto32@gmail.com> wrote: > On Tue, May 28, 2013 at 5:48 AM, V=E1clav Zeman <vhaisman@gmail.com> = wrote: > Curious. Which of the two behaviours is POSIXly correct? >=20 > I believe that /bin/sh's behaviour is correct. I don't know what = shell the manpage is referring to, but it's not bash (bash does the same = thing in a pipeline). Perhaps it's referring to csh? If that is the = case that line is probably causing more confusion rather than = alleviating it. I believe it's referring to csh, possible ksh as well. I tried a similar = experiment with tcsh: #!/bin/tcsh alias fn set var=3D12 set var=3D echo $var yes | fn echo $var=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47252E1F-0965-4772-AE40-865BE5D05CD8>