Re: discrepancy with variable assignments and simple commands between sh and bash

2010-08-25 Thread Chet Ramey
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-

Re: discrepancy with variable assignments and simple commands between sh and bash

2010-08-24 Thread Jan Schampera
Mike Frysinger wrote: On Wednesday, August 25, 2010 00:59:58 Jan Schampera wrote: Mike Frysinger wrote: the difference here being the value in variable "a" after function "f" finishes executing. i was expecting the behavior of `bash`, not of `sh`. i cant seem to find anything covering this in

Re: discrepancy with variable assignments and simple commands between sh and bash

2010-08-24 Thread Mike Frysinger
On Wednesday, August 25, 2010 00:59:58 Jan Schampera wrote: > Mike Frysinger wrote: > > the difference here being the value in variable "a" after function "f" > > finishes executing. i was expecting the behavior of `bash`, not of `sh`. > > i cant seem to find anything covering this in the man pag

Re: discrepancy with variable assignments and simple commands between sh and bash

2010-08-24 Thread Jan Schampera
Mike Frysinger wrote: the difference here being the value in variable "a" after function "f" finishes executing. i was expecting the behavior of `bash`, not of `sh`. i cant seem to find anything covering this in the man page except for perhaps interpreting the meaning of some sections to mea