[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Passing variables to a shell script in unix
- Subject: Re: Passing variables to a shell script in unix
- From: Ken Goolsby <kgoolsby@YAHOO.COM>
- Date: Thu, 12 Aug 1999 06:18:47 -0700
Thanks for your help!
I developed some code to do the mailing of interface
and report files from SQR/unix based upon the FAQ from
Scribe, now I have to kick off a shell to ftp files.
By the way, is there a more reliable transfer
protocol?
Thanks again,
Ken
Group 3000, Inc.
--- Franck Masson <franck.masson@SQRIBE.COM> wrote:
> Ken,
>
> 1) If you want to position a shell variable during
> the execution of SQR
> and retrieve it at the end of SQR, I do not thinks
> it is possible.
> Usally the variable and its value can be passed to
> child process not to
> parent process.
>
> 2) If you just want to call a shell from sqr and
> pass parameter/value
> you can do
> let $command='/usr/sqribe/bin/example.sh a=2 b=toto'
> call system using $command
>
> in your shell ( ksh)
> do some thing like this.
> line=$1
> export $line
> line=$2
> export $line
>
> 3) or same as 2 but only value
>
> let $command='/usr/sqribe/bin/example.sh 2 toto'
> call system using $command
>
> in your shell
> a=$1
> b=$2
>
> 4) in an other way
> let $command='{a=2;b=toto;export a b ; example.sh}'
> call system using $command
>
> franck,
>
> Ken Goolsby wrote:
> >
> > Hey all you (looking for PeopleSoft opportunities)
> > folks -
> > I have looked in the archives and found some info.
> but
> > would like to know if anyone has some simple code,
> > both the shell and sqr, for passing variables to a
> > unix shell script while using the Call System to
> run
> > the shell.
> >
> > Thanks,
> >
> > Ken
> >
> > ===
> > Ken Goolsby/s/
> >
> >
>
_________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at
> http://mail.yahoo.com
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com