@hackage executor0.0.4

Shell helpers

executor

Haskell module to execute single or multiple shell commands

Build Status MIT License

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"]