Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dfed/swift-shell

A simple wrapper for executing shell commands from Swift
https://github.com/dfed/swift-shell

Last synced: about 1 month ago
JSON representation

A simple wrapper for executing shell commands from Swift

Awesome Lists containing this project

README

        

# swift-shell
A simple wrapper for executing shell commands from Swift

## Requirements

- Swift 5.6
- Xcode 13.3+

# Usage

```
import SwiftShell

// Getting output from a shell command:
let output = try Process.execute(#"echo "Hello, world!""#)

// Getting output from a shell command within a specific directory:
let output = try Process.execute("ls", within: .path("~/"))
```