bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More fun with IFS


From: Chet Ramey
Subject: Re: More fun with IFS
Date: Wed, 30 Jan 2013 11:35:55 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

On 1/30/13 2:47 AM, Dan Douglas wrote:

> No, $* always expands to a single word. If multiple words result, those are 
> the result of field-splitting, not an intrinsic multi-word expansion as in 
> the 
> case of address@hidden Though POSIX says very little about the unquoted cases.

I haven't looked at the rest of this, but the situation is clearly not as
absolute as you've phrased it.  In a scenario where word splitting is not
performed, say when IFS is null, there are shells that expand $* to
multiple words (bash, ksh93, FreeBSD sh), those that expand $* to a single
word separated by spaces (posh, mksh, SVR4.2 sh), and those that expand $*
to a single word with the positional parameters concatenated (dash).
Personally, I think the phrase "expands to the positional parameters,
starting from one" supports the bash/ksh93 behavior.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]