Restructure
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<pre>Execute a shell command.
|
||||
|
||||
Built upon [(foreign c)](https://sr.ht/~retropikzel/foreign-c/).
|
||||
|
||||
[Repository](https://git.sr.ht/~retropikzel/foreign-c-system)
|
||||
|
||||
[Issue tracker](https://sr.ht/~retropikzel/foreign-c/trackers)
|
||||
|
||||
[Maling lists](https://sr.ht/~retropikzel/foreign-c/lists)
|
||||
|
||||
[Jenkins](https://jenkins.scheme.org/job/retropikzel/job/foreign-c-system/)
|
||||
|
||||
|
||||
(**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)</pre>
|
||||
Reference in New Issue
Block a user