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

https://github.com/meniny/bash

💻 Run Bash commands from Swift scripts and command line tools.
https://github.com/meniny/bash

Last synced: 12 months ago
JSON representation

💻 Run Bash commands from Swift scripts and command line tools.

Awesome Lists containing this project

README

          

:name: Bash
:author: Elias Abel
:mail: admin@meniny.cn
:desc: Run shell commands from Swift scripts and command line tools.
:version: 1.0.0
:na: N/A
:ios: {na}
:macos: 10.12
:watchos: {na}
:tvos: {na}
:linux: {na}
:xcode: 9.3
:swift: 4.1
:license: MIT
= Meet `{name}`
{author} <{mail}>
v{version}, 2018-05-08

[subs="attributes"]
++++


{name}


Author
EMail
MIT


Version
Platforms
Swift


Build Passing
Cocoapods
Carthage
SPM


++++

:toc:

== 🏵 Introduction

**{name}** is {desc}.

== 📋 Requirements

[%header]
|===
2+^m|Type 1+^m|Requirement

1.5+^.^|Platform ^|iOS ^|{ios}+
^|macOS ^e|{macos}
^|tvOS ^e|{tvos}
^|watchOS ^e|{watchos}
^|Linux ^e|{linux}

^|IDE ^|Xcode ^| {xcode}+
^|Language ^|Swift ^| {swift}+
|===

== 📲 Installation

=== CocoaPods

`{name}` is available on link:https://cocoapods.org[CocoaPods].

[source, ruby, subs="verbatim,attributes"]
----
use_frameworks!
pod '{name}'
----

=== Manually

Copy all files in the `{name}` directory into your project.

== 🛌 Dependency

{na}

== ❤️ Contribution

You are welcome to fork and submit pull requests.

== 🔖 License

`{name}` is open-sourced software, licensed under the link:./LICENSE.md[`{license}`] license.

== 🔫 Usage

[source, swift, subs="verbatim,attributes"]
----
import {name}

do {
print(try Bash.run("cd", args: "~/Desktop"))
print(try Bash.run("pwd"))
print(try Bash.run("ls", args: "-al"))
} catch {
print(error)
}
----

[source, swift, subs="verbatim,attributes"]
----
import {name}

print(Bash.exec(commands: "cd ~/Desktop", "mkdir BashTest", "ls -al"))
----