About

Metadata

  • Last updated , by gianlucaguarini
  • License MIT
  • Categories Package Distribution
  • Maintained by: gianluca.guarini@gmail.com

  • Lottery factor: 0

Links

Installation

Readme

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