Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Recursion and shell functions



    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



Messages sorted by: Reverse Date, Date, Thread, Author