817 B
817 B
Execute a shell command.
Built upon (foreign c).
(system command)
command is a string containing the command you want to run.
Returns the exit code of the command.
Example:
(import (scheme base)
(scheme write)
(scheme file)
(retropikzel system))
(define testfile "test.txt")
(system (apply string-append `("echo \"Hello\" > " ,testfile)))
(define text (with-input-from-file testfile (lambda () (read-line))))
(display text)
(newline)