system

Synopsis

(system command)

(system)

Parameters

  • command : string, optional

Description

This procedure passes the supplied command to the system() standard C library function.

Invoking system with no arguments invokes “/bin/sh” interactively instead.

Side Effects

Return Value

The exit status is returned as an exact integer.

Example

> (system "echo 1234")
1234
0
> (system "exit 22")
22
> (system "cat unknown.txt")
cat: unknown.txt: No such file or directory
1
> (errno)
0
> (system)
sh-3.2$ exit 2
exit
2
>