system
From the SETL Wiki
| system | |
|---|---|
| Category | I/O |
| Syntax | function |
| Compatibility | |
| CIMS SETL | no |
| SETL-S | no |
| SETL2 | no |
| GNU SETL | yes |
Contents |
Purpose
Execute a command via the system shell
Synopsis
system(cmd)
Description
Executes the given command using the posix function system(). Returns the subprocess exit code, and also stores it in the system variable status. Since the command is executed via the shell it may use shell syntax e.g. environment variable expansion.
Examples
-
system('mkdir abc');Invoke the unix 'mkdir' command to create a directory named 'abc', returning zero if successful.
-
system('$EDITOR foo.txt');Invoke the user's default editor to edit the file 'foo.txt'


