Jeff,
you seem to be missing the point by comparing REBOL to grep.
Suppose I wanted to write grep (or anything else) in REBOL, I'd like it
to behave just like that. I'd need a shell wrapper to hide the fact I was
running
the rebol interpreter with a script and I'd expect any and all args to the
shell wrapper
to be passed on to my script, not eaten by the rebol interpreter.
If this isnt clear, here's two examples I'm working with:

1) executable file rpke.exe, runs like this...
rpke -i infilename -o outfilename -e anotherfilename -v

2) java program to do the same thing, run from command line by rpke.bat,
like this...
rpke -i infilename -o outfilename -e anotherfilename -v

The "wrapper" batch file rpke.bat looks like this...

@echo off
rem driver for Java version of rpke command line program
jre -cp rpk.jar;rpkdemo.jar rpkdemo.JRPKE %*

... it passes all the args given to the batch file in the "%*", and these
all get thru to
the java class, and are not soaked up by jre.

I'd like REBOL to be capable of behaving the same way.
Incidentally, maybe there's some easy way to "wrap" the command line args
"%*" so that the rebol
interpreter doesnt notice them, and instead passes them on? Maybe some
extra quotes? 
If the "magic" was all hidden in the .bat file then I can get the job done.  
(Reason - the command lines are being emitted by another script, and it
neither knows or cares which
 implementation is actually being invoked)

I'm aware that there may be flaws in the above .bat file when presented
with quoted filenames containing spaces, fortunately I dont need to care
about that.

Hoping for a workaround, rather than waiting for the is-it-a-bug debate to
conclude.
Sean

At 01:33 PM 18/07/00 -0800, you wrote:
>
>
>> This bit me too. Rebol apparently parses everything that looks like an
>> option on the command line, not just up to the script name.
>> 
>> I consider this a bug and not a feature.
>> 
>> Garold   (Gary)    L.   Johnson    DYNAMIC     Alternatives
>> [EMAIL PROTECTED]
>
>
>  Grep works similarly as REBOL currently does, considering
>  arguments preceded by - to be switches regardless of where
>  they are placed. For example:
>
>    Before and after args:
>
>      grep -A 3 foo * -vi
>
>    In between and after args:
>
>      grep foo -B 10 *.txt -A 20
>
>
>   -jeff
>
>
>

Reply via email to