Let's get to^H^Haway from the core problem

Eric A. Ayer mwalker at ee.pdx.edu
Tue Jun 27 23:06:10 PDT 2000


> > If $file turns out to be a directory, can I recursively call this
> function?
> yes
> 
> > All shell variables are global, which
> > means I have to be real careful.
> You can declare a variable as local, but is will be in scope of all
> subroutines that do not declare it local one way or another
> 
> > Are the passed parameters local?
> Yes, and with local scope
> 
> >  Does $1 in one iteration of a function equal $1 in another iteration?
> Yes

I didn't know about the 'local' declaration of shell variables, so I gave that
a shot and it worked!  Cool!  And yes, the passed variables are definitely
local.  Where did you find out about 'local'?  My shell programming book
didn't say a thing about that.  So thanks!

					-Erik

--
Mail archive: http://www.pcrdallas.com/mail-archives/alfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
Unsubscribe: email alfs-discuss-request at linuxfromscratch.org and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)



More information about the alfs-discuss mailing list