From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18659 invoked from network); 11 Oct 2002 11:07:21 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 11 Oct 2002 11:07:21 -0000 Received: (qmail 7529 invoked by alias); 11 Oct 2002 11:07:02 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17812 Received: (qmail 7508 invoked from network); 11 Oct 2002 11:06:59 -0000 Date: Fri, 11 Oct 2002 13:05:13 +0200 From: DervishD To: Oliver Kiddle Cc: zsh-workers@sunsite.dk Subject: Re: Recursion and shell functions Message-ID: <20021011110513.GB270@DervishD> Mail-Followup-To: Oliver Kiddle , zsh-workers@sunsite.dk References: <20021010194154.GA10963@DervishD> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4i Organization: Pleyades Net Hi Oliver :) Thanks a lot for your answer :) > If you know that you will at least have ksh88, you can get local > variables by using the function name { ... } syntax for functions > and using typeset to declare variables. The only requirement is a SuSv3 compatible shell :( > The bourne shell doesn't have local variables except for the > positional parameters and you can use them. Of course, how I missed?!!! > I think this will be portable: > > func() { > set * I don't catch this :??? What is it for? Oh, I know, it sets '$1', '$2', etc... to the files and directories in current dir :)) Very inteligent :)) > Something like find is going to be more reliable though. Of course. I'm considering adding the dependency on 'find', but I will really try to avoid :)) Thanks for your example. You're great, Oliver :) Raśl