No wildcard expansion with redirected filenames
Isn't this supposed to work?
$ touch file1 $ echo 1 > file? $ ls file? file? file1
I.e. dash actually created a file named 'file?' instead of globbing.
Please CC me if possible, I'm not on the list.
Kind regards,
Alkis Georgopoulos
Quoted 8 lines · Alkis Georgopoulos
Isn't this supposed to work?
$ touch file1 $ echo 1 > file? $ ls file? file? file1I.e. dash actually created a file named 'file?' instead of globbing.
No, this is not supposed to work. POSIX says that a non-interactive shell must not generate pathnames for a redirection; an interactive shell may do so, provided there is exactly one match.
Dash is primarily meant as a non-interactive shell and wants to be as small as possible, and therefore never generates pathnames for a redirection.
Signature · 1 line
Jilles Tjoelker