Running executables with steel #202
-
Hello, I've never used lisp languages so I don't really know how to write them very well. I usually learn by doing and I think that neat usecase for me would be swapping shell scripts with steel ones. I think that maybe macro system could provide good ergonomics here that regular programming languages I use are lacking (go, rust, etc). Is there any example of how to run some program, capture it's output etc. etc.? I've looked through examples and didn't find anything but maybe I'm just blind :P |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
So you'll find the process module here Here is an example of running a process: (define (build-release)
(~> (command "cargo" '("build" "--release")) (spawn-process) (Ok->value) (wait))) To capture std out you could try: (define (build-release)
(~> (command "cargo" '("build" "--release")) (spawn-process) (Ok->value) (wait->stdout))) It certainly could use some documentation 😅 |
Beta Was this translation helpful? Give feedback.
So you'll find the process module here
Here is an example of running a process:
To capture std out you could try:
It certainly could use some documentation 😅