Jeff wrote:
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
[Garold L. Johnson] That is true, and is true of many Unix programs, but
AFAIK it isn't true of Perl which handles switches up to the script name and
passes the rest to the script. I suggest that Perl is a better analogy to
REBOL than is grep.
The standard mode for getopt in Perl (which is patterned after the Unix
version used in C) is to process all arguments regardless of position
leaving only files in the argument list, but this is still within the script
and not being intercepted by the Perl interpreter itself.
Thanks,
Garold (Gary) L. Johnson
DYNAMIC Alternatives
[EMAIL PROTECTED]
- [REBOL] Rebol's argument handling is broken Re:(4) jhagman
- [REBOL] Rebol's argument handling is broken Re:(5) dynalt
- [REBOL] Writing to a half-byte tim
- [REBOL] Rebol's argument handling is broken Re: seanh
- [REBOL] Rebol's argument handling is broken Re:(2) jeff
- [REBOL] Rebol's argument handling is broken Re:(3) jehamby
- [REBOL] Rebol's argument handling is broken Re:(3) dynalt
- [REBOL] Rebol's argument handling is broken Re:(2) dynalt
- [REBOL] Rebol's argument handling is broken Re:(3) jeff
- [REBOL] Rebol's argument handling is broken Re:(4) jehamby
- [REBOL] Rebol's argument handling is broken Re:(4) dynalt
- [REBOL] Rebol's argument handling is broken Re:(4) seanh
- [REBOL] Rebol's argument handling is broken Re:(5) jeff
- [REBOL] Rebol's argument handling is broken Re:(5) jeff
- [REBOL] Rebol's argument handling is broken Re:(6) jkinraid
- [REBOL] Rebol's argument handling is broken Re:(4) jehamby
