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

Re: how to pass arguments from one bsh script to another

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
  source ("myscript1.bsh");  // uses 'foo'