On 3/29/13 11:18 AM, John Kearney wrote:
> Oh and FYI
> IFS=: read
> may change the global IFS on some shells I think.

Very few, if any.

> Mainly thinking of pdksh right now.
> 
> IFS=: ls   # local
> 
> ls_wrap(){
>   ls
> }
> 
> IFS=: ls_wrap # Changes global IFS
> 
> I think it was the same with builtins, but not sure right now.

There are three things to look at: Posix `special' builtins, `regular'
builtins, and shell functions.  Posix says that assignment statements
preceding special builtins persist, assignments before regular builtins
don't.  Shell functions are supposed to act like special builtins.

This is how bash behaves in Posix mode.

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

Reply via email to