File: system-command

package info (click to toggle)
scheme9 2025.08.12-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,080 kB
  • sloc: lisp: 16,752; ansic: 11,869; sh: 806; makefile: 237; sed: 6
file content (12 lines) | stat: -rw-r--r-- 434 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
S9fES  (system-command string)  ==>  integer

Pass the given STRING to the operating system for execution and
return the exit code returned by the system. On Unix this typically
means passing the command to /bin/sh and on Plan 9 commands will
be passed to /bin/rc.

An exit code of zero indicates success and a non-zero exit code
signals failure.

(system-command "ls")              ==>  0
(system-command "ls nonexistent")  ==>  127