Subject: bin/37494: sh doesn't glob input redirect filenames as expected
To: None <,>
From: None <>
List: netbsd-bugs
Date: 12/06/2007 21:55:01
>Number:         37494
>Category:       bin
>Synopsis:       /bin/sh doesn't expand * in filenames for input redirection.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 06 21:55:01 +0000 2007
>Release:        NetBSD 4.99.38
System: NetBSD netbsd.localdomain 4.99.38 NetBSD 4.99.38 (PUFFS) #1: Sat Dec 1 19:29:09 PST 2007 riz@netbsd.localdomain:/home/riz/obj/sys/arch/amd64/compile/PUFFS amd64
Architecture: x86_64
Machine: amd64
	Even if a file '/tmp/xyz' exists, "cat </tmp/xyz*" doesn't
redirect input from it:

$ cat < /tmp/xyz*
sh: cannot open /tmp/xyz*: no such file

/bin/ksh and /bin/csh both work as expected, here, and SUSv2 says:

 Redirecting Input
Input redirection will cause the file whose name results from the expansion of word to be opened for reading on the designated file descriptor, or standard input if the file descriptor is not specified.


echo "123" > /tmp/xyz  # assume no other filenames in /tmp begin with "xyz"
cat </tmp/xyz*

	None given.