bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing Information To A Function


From: Chris F.A. Johnson
Subject: Re: Passing Information To A Function
Date: Thu, 13 Dec 2001 22:08:21 GMT

On Thu, 13 Dec 2001, SoloCDM wrote:

> Can an array be passed to a function?  If there is a better, I'm
> listening!

Two methods:

        xxx() {
            xxx_var=( `eval echo address@hidden )
            echo address@hidden
        }

        xxy() {
            xxx_var=( "$@" )
            echo address@hidden
        }

        qq=( q w e r t y u i o p )

        xxx qq
        xxy address@hidden

-- 
        Chris F.A. Johnson                              address@hidden
        =================================================================
        address@hidden                http://cfaj.freeshell.org
        address@hidden        http://members.rogers.com/c.f.a.johnson



reply via email to

[Prev in Thread] Current Thread [Next in Thread]