On Mon, Oct 24, 2016 at 8:20 AM,  <dietmar.schind...@manroland-web.com> wrote:
>> Von: Denys Vlasenko
>> Gesendet: Montag, 24. Oktober 2016 01:31
>> ...
>>
>> On Tue, Oct 18, 2016 at 4:31 PM, Lauri Kasanen <cur...@operamail.com> wrote:
>> > The following fails in ash 1.24.1, probably also in git. Works in bash.
>>
>> but not in non-interactive bash called as sh!
>>
>> Interactive bash: works
>> Interactive bash called as sh: works
>> bash -c 'cat <z*patch': works
>> sh -c 'cat <z*patch': does not work!!!
>>
>> This is illogical.
>
> It may be illogical, but at least it's documented.
>
> www.gnu.org/software/bash/manual/bash.html#Bash-Startup-Files - "When invoked 
> as sh, Bash enters POSIX mode after the startup files are read."
>
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07
>  - "Pathname expansion shall not be performed on the word by a 
> non-interactive shell; an interactive shell may perform it, but shall do so 
> only when the expansion would result in one word."

Yes. Standards merely codified existing practice.

Note that they allow to consistently never do globbing
on the redirect word.

To me it looks like the best course of action.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to