Subject: brace expansion and ksh?
To: None <netbsd-help@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-help
Date: 10/11/2007 17:35:27
I though ksh didn't have brace expansion. But today I was reading the man
page and it was documented with an example.
But the example does not work:
$ ksh
$ echo a{c,b{X,Y},d}e
a{c,b{X,Y},d}e
$ bash
bash-3.2$ echo a{c,b{X,Y},d}e
ace abXe abYe ade
Even simple example in ksh doesn't work for me:
$ echo a{b,c,d,e}f
a{b,c,d,e}f
Now I see man page says in different section:
Once brace expansion has been performed, the shell replaces file
name patterns with the sorted names of all the files that match
the pattern (if no files match, the word is left unchanged).
But that doesn't seem to work either in ksh:
$ echo {D,M}*
{D,M}*
$ bash
bash-3.2$ echo {D,M}*
DESCR MESSAGE Makefile Makefile.common
What is correct behaviour for ksh?
Jeremy C. Reed