cd [directory]
pwd
writeto [filename]
appendto [filename]
shell [command]
CRE provides a number of commands for interacting with the underlying operating system
CRE uses a working directory (folder) where files are read from or saved to. By default, this is set by the system from where CRE was started from. The pwd command may be used to find the current working directory:
CRE> pwd /Users/fred/bellview3
To change the working directory, use the cd command; for example to go into the demo subdirectory:
CRE> cd demo CRE> pwd /Users/fred/bellview3/demo
cd without an argument will return to the user's home directory
Redirection of output to an external file is available in CRE for the following commands: echo, list, print, ring, show, showcomments. Error and status messages are not redirected, nor is displaying help.
To start redirecting output to a file e.g. fred.txt
CRE> writeto fred.txt
To stop redirection and return to output on the screen, use writeto without an argument.
CRE> writeto
writeto always overwrites the destination file if it already exists. To append output onto an existing file, the appendto should be used instead.
The shell command enables operating system commands to be run. All arguments following it are passed to the default system shell; for example on UNIX, the vi editor may be started by the following:
CRE> shell vi fred.txt
To get an interactive shell; i.e. /bin/bash on UNIX or cmd.exe on Windows, use shell without arguments. Typing exit in the shell will return to CRE.
CRE> shell $ ls fred.txt freda.txt freddy.txt $ date Sat 26 Oct 2019 21:42:15 BST $ exit CRE>
N.B. shell may be abbreviated by typing !; for example !ls lists all files in the current working directory on UNIX.