https://github.com/vvmnnnkv/shell
Utility function to execute shell command
https://github.com/vvmnnnkv/shell
shell swift swiftpm
Last synced: 2 months ago
JSON representation
Utility function to execute shell command
- Host: GitHub
- URL: https://github.com/vvmnnnkv/shell
- Owner: vvmnnnkv
- Created: 2019-04-24T13:30:32.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-19T04:57:39.000Z (about 7 years ago)
- Last Synced: 2025-01-29T04:36:09.178Z (over 1 year ago)
- Topics: shell, swift, swiftpm
- Language: Swift
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shell
Execute command from Swift:
```swift
import Shell
// dull function
let res = shell("/bin/ls", ["-la"])
print("output:\n\(res.output)\n\nexit code: \(res.exitCode)")
// string extension
print("/bin/ls".shell("-la"))
// bang prefix func
!"ls -la"
```