local variables in bash

Jon Jensen jon at endpoint.com
Fri Feb 13 08:27:52 MST 2009


On Fri, 13 Feb 2009, Stuart Jansen wrote:

>> I wouldn't be surprised if bash borrowed the behavior & the name from 
>> Perl.
>
> You've got your history backward there, sonny. Now get off my lawn!

You may be just kidding, but I am interested to know the history.

Perl gained "local" in Perl 2.0, with this commit:

http://perl5.git.perl.org/perl.git/commitdiff/378cc40b38293ffc7298c6a7ed3cd740ad79be52
commit 378cc40b38293ffc7298c6a7ed3cd740ad79be52
Author: Larry Wall <larry at wall.org>
Date:   Sun Jun 5 00:00:00 1988 +0000

The oldest version of bash I found is 1.14 from 1994, and it had local 
too. There doesn't appear to be a public version control repository for 
bash, oddly. Wikipedia claims bash was created in 1987, but I can't show 
whether it had local then or not. Does anyone have any older versions 
floating around?

Jon

-- 
Jon Jensen
End Point Corporation
http://www.endpoint.com/



More information about the PLUG mailing list