Created
February 10, 2018 22:38
-
-
Save noisesmith/684e09a77ca4390f03fd2e53af1d5464 to your computer and use it in GitHub Desktop.
simple scsh usage in guile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+justin@fuckmonkey:~/guile$ rlwrap guile -L guile-scsh/ | |
GNU Guile 2.2.2.302-98fc9 | |
Copyright (C) 1995-2017 Free Software Foundation, Inc. | |
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. | |
This program is free software, and you are welcome to redistribute it | |
under certain conditions; type `,show c' for details. | |
Enter `,help' for help. | |
+scheme@(guile-user)> (use-modules (scsh syntax) (scsh scsh) (ice-9 receive)) | |
+scheme@(guile-user)> (use-modules (scsh run-extras)) | |
+scheme@(guile-user)> (receive (status out err) | |
(run/collecting (1 2) (cat /tmp/foo)) | |
(list 'status status 'out (port->string out) 'err (port->string err))) | |
$1 = (status 256 out "" err "cat: /tmp/foo: No such file or directory\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment