Description
Shell helpers.
Description
Haskell module to execute single or multiple shell commands
README.md
executor
Haskell module to execute single or multiple shell commands
API
exec
Execute a single shell command returning its output
import Executor (exec)
main = do
-- execute a simple `ls` in the current folder
res <- exec "echo hi"
-- hi\n
execSequenceSync
Execute a list of shell commands in sequence synchronously returning their results in a list
import Executor (execSequenceSync)
main = do
-- execute synchronously the following commands
res <- execSequenceSync [
"echo hi",
"sleep 1",
"echo goodbye"
]
-- ["hi\n", "", "goodbye\n"]