[REBOL] Re: command line stuff
From: greggirwin:mindspring at: 5-May-2004 11:56
TF> if I have a script, say, blap.r, that has a function,
TF> a: func['b 'c] ["blah" "blah"]
TF> how can I, from bash (my shell) execute something like,
TF> $ blap.r b c
Put a shebang line at the top of your script, including the -c option
to tell REBOL to run in CGI mode, then just PRINT your results.
Anton's advice about looking at both ways args come in is really good,
so, to build on that...
#! /usr/bin/rebol -c
test-fn: func [value][print ["The value given was:" mold value]]
Of course, you don't need to define the function; you can just do
print ["The value given was:" mold system/options/args]