Consider the following transcript, along the same lines as the last one:
Script started on Tue Jan 18 23:24:05 2000
jbone@bastrop> ls -al reb.r
-rwxr-xr-x 1 jbone jbone 185 Jan 18 23:23 reb.r*
jbone@bastrop> cat reb.r
#!/usr/local/bin/rebol --cgi -s
REBOL [
Title: "reb"
File: %reb.r
Purpose: {
Test rebol shell invocation.
}
]
print "Hello, rebol"
jbone@bastrop> ./reb.r
Finger protocol loaded
Whois protocol loaded
Daytime protocol loaded
SMTP protocol loaded
POP protocol loaded
HTTP protocol loaded
FTP protocol loaded
NNTP protocol loaded
The command line usage is:
REBOL <options> <script> <arguments>
All fields are optional. Supported options are:
--cgi (-c) Check for CGI input
--do expr Evaluate expression
--help (-?) Display this usage information
--nowindow (-w) Do not open a window
--quiet (-q) Don't print banners
--script file Explicitly specify script
--secure level Set security level:
(none write read throw quit)
-s Shortcut: no security
+s Shortcut: full security
--trace (-t) Enable trace mode
Examples:
REBOL script.r
REBOL script.r 10:30 [EMAIL PROTECTED]
REBOL script.r -do "verbose: true"
REBOL --cgi -s
REBOL --cgi -secure throw --script cgi.r "debug: true"
REBOL --secure none
Script: "reb" (none)
Hello, rebol
>> quit
jbone@bastrop> rebol --cgi -s reb.r
Hello, rebol
jbone@bastrop> exit
Script done on Tue Jan 18 23:24:44 2000
--
Now, shouldn't those two methods of calling that script --- i.e., invoking it
directly via ./reb.r vs. passing it to the interpreter via rebol --cgi -s reb.r
--- produce the same results? What's going on here?
jb