External Commands

These commands are used to run external programs or perform OS-dependent things. Unless otherwise noted, they behave similarly to the corresponding UNIX commands. All commands begin with cmd_.

cmd_rm args

Removes the specified files.

cmd_rmdir args

Removes the specified directories.

cmd_rm_r args

Removes the specified files or directories.

cmd_cp args

Copies the first files into the last named directory, or renames a file.

cmd_cp_r args

Recursively copies the first files into the last named directory.

cmd_mv args

Moves the first files into the last named directory.

cmd_rename old new

Renames old to new.

cmd_mkdir dir

Makes a new directory with the specified name.

cmd_date

Returns the current date.

cmd_chmod mod file

Changes the file permissions to the given octal mod.

cmd_kill pid sig [15]

Sends a signal to the process. On UNIX systems, the sig argument gives the signal number.

cmd_uname_n

Returns the current computer's name.

cmd_whoami

Returns the current user name.

cmd_uname_a

Returns information about the current OS.

cmd_tempfile fn suff [""]

Returns a file that begins with fn that does not currently exist.

cmd_gzip args

Runs gzip with the given arguments.

cmd_cat_onto f1 f2

Appends f1 onto the end of f2.

cmd_tar args

Runs tar with the given arguments.

cmd_uuencode f u f2 [""]

Runs uuencode with the given arguments.

cmd_uudecode uu

Runs uudecode on the given file.

cmd_grep args

Runs grep with the given arguments.

cmd_renice pri pid

Changes the priority of process pid to pri.

cmd_wc file

Runs wc on the specified file.

cmd_xterm args

Opens an Xterm or a Windows command prompt in the current directory.

cmd_ln_s from to

Either symbolically link from to to, or on Windows system, copy it.

cmd_pagesize

Returns the current page size on the system.

cmd_freemem

Returns the amount of free memory, if possible.

cmd_edit_file file [""] back [0]

Edits the file using the default text editor. If back is 1 then return immediately, else, wait until the editor finishes. The return value is the file that was selected (if the original file was blank).

cmd_print_file filename

Prints the file on the default printer.

cmd_check_process_exists pid

Returns 1 if the process exists on the current machine, else returns 0.