SCO Unix ksh (file name expansion using {}) question

John Beaudin john at beaudin.UUCP
Sun Dec 30 02:06:36 AEST 1990


sef at kithrup.COM (Sean Eric Fagan) writes:

>In article <1476 at beaudin.UUCP> john at beaudin.UUCP (John Beaudin) writes:
>>Suppose that foo and bar are 2 files in the current directory. Why will
>>	$ ls {foo,bar}
>>work, but
>>	$ ls {foo}
>>fail?

>It looks like ksh does the same thing if the expansion "fails" as it does if
>any globbing fails:  it puts, and puts (no pun intended) things back to
>normal.  {foo} "fails" because there's only one thing in the list

I think it should work simply because there might be a script with the line
	$ cp {$*} /tmp
which would fail if only 1 arg was passed via the command line. Besides,
it works ok in csh.
Also, I've got Korn's book on ksh but can't find any reference to {} in
pathname expansion; nor in the ksh man page. Maybe it's undocumented
because it's a little buggy and not officially supported yet.
-- 
My OTHER .signature is awaiting apropriate display technology



More information about the Comp.unix.sysv386 mailing list