I am running Rebol on Debian Stable Linux and I have put rebol executable in /usr/local/bin. Then I have created following script file and also kept it in /usr/local/bin:
#! /usr/local/bin/rebol
REBOL []
print what-dir
quit
pwd
print call "pwd"
You can find your own directory where you are in system/options/path and if you want it to be your current working directory and what-dir to report your own directory as current directory, you have to add this line
system/script/path: system/options/path
or
change-dir system/options/path
before calling what-dir.
Even print call "pwd"
uses and shows now your own as current directory