bug-bash
[Top][All Lists]
Advanced

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

Re: Unexpected word splitting on $* when IFS is unset


From: Chet Ramey
Subject: Re: Unexpected word splitting on $* when IFS is unset
Date: Sat, 24 Jun 2017 13:01:29 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

On 6/23/17 10:35 PM, Robert Elz wrote:
>     Date:        Fri, 23 Jun 2017 11:39:45 -0400
>     From:        Greg Wooledge <address@hidden>
>     Message-ID:  <address@hidden>
> 
>   | That's what I always thought too, but if commonly used shells like
>   | dash can't even agree on this, then I simply upgrade my response level
>   | from "bad practice" to "completely wrong, don't ever do this" when
>   | someone uses unquoted $* or address@hidden
> 
> As Chet said in an earlier response, unquoted expansions are more often
> bugs than not - but not always.  Anything that you attempt to apply as a
> "one rule to govern them all" is going to be inappropriate sometimes.

In the vast majority of cases, people really desire the effects of "$@"
and should just use that.

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



reply via email to

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