Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!tut.cis.ohio-state.edu!att!cbnews!lml From: lml@cbnews.ATT.COM (L. Mark Larsen) Newsgroups: comp.unix.wizards Subject: Re: Positional Parameter Settin in function Message-ID: <7191@cbnews.ATT.COM> Date: 6 Jun 89 22:05:50 GMT References: <570024@hpsemc.HP.COM> Reply-To: lml@cbnews.ATT.COM (L. Mark Larsen) Organization: AT&T Bell Laboratories Lines: 22 # In article <570024@hpsemc.HP.COM> gph@hpsemc.HP.COM (Paul Houtz) writes: # # In my ksh, the "set" command doesn't seem to work within a function: # It works in a function - it just sets the positional parameters for *that* function - not the current shell. # As a shell command I do the following: (example deleted) # # Is this a bug in ksh? Is it a feature? Is there some explanation of this # feature? This is not a bug but the way functions are supposed to work. To modify the positional parameters of the current shell by executing some shell script, use ". filename [args]" (reads the file and executes it in the current environment). Note that Bourne shell does not allow arguments and that in ksh, passing arguments in this manner is the same as setting the positional parameters of the current shell. cheers, -lml