[REBOL] Re: Passing arguments to scripts in Windows?
From: ingo:2b1 at: 22-Jun-2001 20:32
Hi Terry,
here's a little script:
[REBOL []
x: none
print ["system/options/args" mold system/options/args]
print ["system/script/args " mold system/script/args]
do system/script/args
print ["x is" mold x]
]
Which started as:
[ingo--smrgol] ingo > r print-it.r -- x: {hi}
will result in:
system/options/args ["x:" "{hi}"]
system/script/args "x: {hi}"
x is "hi"
(I think it changed for /Core 2.5, everything after "--"
will be sent directly to the script, so it is even possible
to send arguments to user.r).
kind regards,
Ingo
Once upon a time Terry Brownell spoketh thus:
> Hi all.
>
> It was this article that got me inspired. But it seems to Unix based? The
> examples don't work for me on my win2k machine. It's straight forward to
> create a little script from the shell, but I'm looking for a simple way to,
> among other things, pass a variable to a script... eg:
>
> Let's say we have this script on the server called print-it.r...
>
> rebol []
> print x
>
> ... and we want to send the variable "x" via the shell (somehow?)...
>
> c:\rebol\print-it.r "x: {blah blah blah}"
>
> TBrownell
>
> ----- Original Message -----
> From: "Joel Neely" <[joel--neely--fedex--com]>
> To: <[rebol-list--rebol--com]>
> Sent: Friday, June 22, 2001 6:02 AM
> Subject: [REBOL] Re: Passing arguments to scripts in Windows?
>
> > Hi, Terry,
> >
> > Also see
> >
> > http://www.rebolforces.com/articles/rebolandtheshell.html
> >
> > for a discussion with lots of examples, thanks to Jeff.
> >
> > -jn-
> >
> > Terry Brownell wrote:
> > >
> > > Being able to pass arguments to a script via the command prompt
> > > would be very handy. But I can't seem to make it work.
> > > Any ideas?
> > >
> >
> > --
> > "It's turtles all the way down!"
> > joel'dot'neely'at'fedex'dot'com
> > --
> > To unsubscribe from this list, please send an email to
> > [rebol-request--rebol--com] with "unsubscribe" in the
> > subject, without the quotes.
> >
> >
>
> --
> To unsubscribe from this list, please send an email to
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
>
--
do http://www.2b1.de/
_ . _
ingo@)|_ /| _| _ <We ARE all ONE www._|_o _ _ ._ _
www./_|_) |o(_|(/_ We ARE all FREE> ingo@| |(_|o(_)| (_|
._| ._|