Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/dfed/swift-shell
- Owner: dfed
- License: apache-2.0
- Created: 2022-04-22T02:42:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-01T15:34:03.000Z (over 2 years ago)
- Last Synced: 2023-08-21T22:52:42.665Z (about 1 year ago)
- Language: Swift
- Size: 20.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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("~/"))
```