On 8/25/10 1:39 AM, Jan Schampera wrote: > Okay, I think I found something > > [POSIX excerpts] > - When a function is executed, it shall have the syntax-error and > variable-assignment properties described for special built-in utilities in > the enumerated list at the beginning of Special Built-In Utilities . > - Variable assignments specified with special built-in utilities remain in > effect after the built-in completes; this shall not be the case with a > regular built-in or other utility. > > [Bash docs about POSIX mode] > 24. Assignment statements preceding shell function calls persist in the > shell environment after the function returns, as if a POSIX > special builtin command had been executed. > > Conclusion (still waiting for the Austin Group undercover guy): > - POSIX specifies this behaviour > - Bash in Bash-mode overrides this (which results in intuitive behaviour, > IMHO) > - Bash in POSIX-mode respects it
Your conclusions are correct. -- ``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/