Just bringing all changes to main Reviewed-on: https://codeberg.org/retropikzel/foreign-c-libraries/pulls/1 Co-authored-by: retropikzel <retropikzel@iki.fi> Co-committed-by: retropikzel <retropikzel@iki.fi> |
||
|---|---|---|
| .. | ||
| LICENSE | ||
| README.html | ||
| README.md | ||
| VERSION | ||
| test.scm | ||
README.md
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)