simple-cmd-0.1.1: Simple String-based process commands

Safe HaskellSafe-Inferred

SimpleCmd

Synopsis

Documentation

cmd :: String -> [String] -> IO StringSource

Run a command in a process and return stdout

cmd_ :: String -> [String] -> IO ()Source

Run command in process, output goes to stdout and stderr

cmdBool :: String -> [String] -> IO BoolSource

Run a command, and return Boolean status

cmdIgnoreErr :: String -> [String] -> String -> IO StringSource

Run a command, drop stderr, and return stdout

cmdLines :: String -> [String] -> IO [String]Source

Run command, return list of stdout lines | since 0.1.1

cmdlog :: String -> [String] -> IO ()Source

Log a command with a datestamp

cmdMaybe :: String -> [String] -> IO (Maybe String)Source

Run a command in a process, maybe returning output if it succeeds

cmdN :: String -> [String] -> IO ()Source

Dry-run a command: print it to stdout - more used for debugging

cmdQuiet :: String -> [String] -> IO StringSource

Run a command hiding stderr, if it succeeds return stdout

cmdSilent :: String -> [String] -> IO ()Source

Run a command hiding stdout: stderr is only output if it fails.

cmdStdIn :: String -> [String] -> String -> IO StringSource

Run a command, passing input string as stdin, and return stdout

cmdStdErr :: String -> [String] -> IO (String, String)Source

Run command in a process, returning stdout and stderr

egrep_ :: String -> FilePath -> IO BoolSource

grep for extended regexp in file, and return Boolean status

grep_ :: String -> FilePath -> IO BoolSource

grep a pattern in file and return Boolean status

removePrefix :: String -> String -> StringSource

Remove a prefix from a string if there

removeStrictPrefix :: String -> String -> StringSource

Remove prefix, or fail with error

removeSuffix :: String -> String -> StringSource

Remove a suffix from a string if there

shell :: String -> IO StringSource

Run a command string in a shell, and return stdout

shell_ :: String -> IO ()Source

Run a command string in a shell, output goes to stdout

sudo :: String -> [String] -> IO ()Source

sudo a command

(+-+) :: String -> String -> StringSource

Combine strings with a single space