Ash wildcard usability bug
Ron Yorston
rmy at pobox.com
Tue Oct 18 16:15:23 UTC 2016
Lauri Kasanen wrote:
>The following fails in ash 1.24.1, probably also in git. Works in bash.
>
>nc 10.0.0.1 1234 < *zip
>
>"sh: can't open *zip: no such file"
>
>Also applies to cat, etc. With only one matching file in the directory.
Confirmed that it fails with latest git master. It also fails with
latest dash.
POSIX says for this case:
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.
which suggests that not performing the expansion is acceptable.
The code (both in Busybox and dash) uses the symbol EXP_REDIR to cover
this case but most occurrences are of the form
/* TODO - EXP_REDIR */
So it looks as though somebody would need to do it...
Ron
More information about the busybox
mailing list