local variables in bash

Chad R Mayfield chad at planetmayfield.com
Thu Feb 12 17:33:46 MST 2009


>
> If you run this, you'll notice that loc_var prints as 23.  It should  
> print
> as 43.
>


Looks good to me and works on two environments;

var in function 23, outside 43.

Bash 3.2.17(1)-release (Mac OS X 10.5.6)
Bash 3.2.33(1)-release (Fedora 9)

What version of bash are you using?


---
Chad R Mayfield
chad at planetmayfield.com
GPG Key: 0C9A026F
http://www.planetmayfield.com/
http://www.chadmayfield.com/
http://www.linkedin.com/in/chadmayfield


More information about the PLUG mailing list