Shell Script Question
Mike Reinehr
cmr
Fri Jun 3 09:22:08 PDT 2005
On Thursday 02 June 2005 05:21 pm, Bill Davidson wrote:
> On 14:17 Thu 02 Jun , Mike Reinehr wrote:
> > Brad,
> >
> > Your scripting skills appear to be far past mine, but my experience with
> > sh has been that all variables are global. I just ran a quick test of a
> > script similar to yours and, in fact, they were. A couple of differences
> > that might be significant:
> >
> > I initialized my variables the old fashioned way:
> >
> > export TEMP=0 TEMP1=1 TEMP2=2
>
> The export statement makes those variables available anywhere in the shell
> session. If you spawned another sub-shell within that one, they would be
> available there as well.
>
> Bill
Bill,
Your right, of course, but anyway I write it here, my variables are global,
throughout the script.
cmr
--
Debian 'Sarge': Registered Linux User #241964
"More laws, less justice." -- Marcus Tullius Ciceroca, 42 BC
More information about the Linux-users
mailing list