diff --git a/README.md b/README.md index b959b66..9993fc3 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,13 @@ let output = try shellOut(to: "echo", arguments: ["Hello world"]) print(output) // Hello world ``` +You can also easily run a series of commands at once, optionally at a given path: +```swift +try shellOut(to: ["mkdir NewFolder", "echo \"Hello again\" > NewFolder/File"], at: "~/CurrentFolder") +let output = try shellOut(to: "cat File", at: "~/CurrentFolder/NewFolder") +print(output) // Hello again +``` + In case of an error, ShellOut will automatically read `STDERR` and format it nicely into a typed Swift error: ```swift do {