On Tue, 26 Sep 2006 08:44:50 -0400 James Carlson wrote: > April Chin writes: > > > Incompatibility (9)... Does this mean pattern matching in the same > > > statement/command? Or subsequently for the rest of the script? Sounds > > > like a bug. > > > > >From the COMPAT file: > > > > 9) In ksh93, pattern matching following a redirection symbol works only > > in interactive shell, not in scripts. > > > > The above refers to pattern matching in the same statement. > > For example, in a ksh93 script, "echo hi >> foo*" will write to the file > > literally named "foo*" rather than to a file whose name matches the pattern > > (starts with the string "foo") In Solaris ksh, the same script will > > write to a file matching the pattern. I'll add the example.
> That one is a surprising change, particularly so because it's > dependent on something apparently unrelated to the problem (the result > of isatty(0), I assume). I think it'll need to be discussed in the > context of that future ksh replacement case. this is directly from posix: [n] redir-op word Pathname expansion shall not be performed on the word by a non-interactive shell; an interactive shell may perform it, but shall do so only when the expansion would result in one word. and If the -i option is present, or if there are no operands and the shell's standard input and standard error are attached to a terminal, the shell is considered to be interactive. -- Glenn Fowler -- AT&T Research, Florham Park NJ --