[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to pass arguments from one bsh script to another
- To: david sims <david@simscomputing.com>
- Subject: Re: how to pass arguments from one bsh script to another
- From: Pat <pat@pat.net>
- Date: Mon, 10 Jan 2000 08:51:36 -0600
- Approved: pat@pat.net
- Cc: users@beanshell.org, developers@beanshell.org
- In-Reply-To: <200001101446.HAA00316@aspen.cotcomsol.com>; from david sims on Mon, Jan 10, 2000 at 07:46:00AM -0700
- Mail-Followup-To: david sims <david@simscomputing.com>, users@beanshell.org,developers@beanshell.org
- References: <200001101446.HAA00316@aspen.cotcomsol.com>
- Reply-To: pat@pat.net
On Mon, Jan 10, 2000 at 07:46:00AM -0700, david sims wrote:
> > // myscript2
> > source ("myscript1.bsh");
> > foo( 1, 2 );
>
> hmmm, I was thinking of the more basic case where myscript1.bsh doesn't have
> any methods defined, unlike myscript1.bsh above, which defined foo. My
> script just does its work as if it were a main method().
Well in that case you don't have to pass any arguments - the sourced
script will inherit all of the variables defined in the current environment.
// myscript2
foo=42;
source ("myscript1.bsh"); // uses 'foo'
Pat