Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Mar 2002 16:26:09 -0800
From:      Luigi Rizzo <rizzo@icir.org>
To:        hackers@freebsd.org
Subject:   weird sh behaviour
Message-ID:  <20020315162609.B93253@iguana.icir.org>

next in thread | raw e-mail | index | archive | help
/bin/sh seems not to expanding metacharacters in filenames used for
I/O redirection:

	$ /bin/sh
	$ ls -l
	$ touch bbb
	$ echo test > b*
	$ ls -l
	total 2
	-rw-r--r--  1 luigi  wheel  5 Mar 16 01:20 b*
	-rw-r--r--  1 luigi  wheel  0 Mar 16 01:20 bbb
	$ 

By contrast, csh and bash do the right thing:

	bash-2.05a$ ls -l
	bash-2.05a$ touch bbb
	bash-2.05a$ echo test > b*
	bash-2.05a$ ls -l
	total 2
	-rw-r--r--  1 luigi  wheel  5 Mar 16 01:24 bbb

Is it a feature or a bug ?

	cheers
	luigi

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020315162609.B93253>