# generic-subshell

> Allows you to run all commands as subshells and collect all exit codes

Latest version **0.0.1003** (published 2017-10-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install generic-subshell
pnpm add generic-subshell
yarn add generic-subshell
bun add generic-subshell
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.1003 |
| Published | 2017-10-31 |
| First published | 2017-02-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Olegzandr |
| Maintainers | oresoftware |
| Keywords | suman, test, bash, subshell, generic, parallel, shell |

## Links

- npm: https://www.npmjs.com/package/generic-subshell
- Repository: https://github.com/ORESoftware/generic-subshell
- Homepage: https://github.com/ORESoftware/generic-subshell#readme
- Issues: https://github.com/ORESoftware/generic-subshell/issues
- npm.io page: https://npm.io/package/generic-subshell

## Recent versions

- 0.0.1003 (latest) — 2017-10-31
- 0.0.1001 — 2017-02-19

## README

# Generic-Subshell

Run a dynamic number of bash commands in parallel, collect all exit codes.


### This project essentially has two interfaces.

1. You can interact with the shell script directly. Using NPM, install this project.* Then reference the script with:
./node_modules/generic-subshell/lib/run.sh. Or just copy and paste the script in your project and make it your own :)

2. There is a Node.js interface - pass the Node.js interface an array of commands, and this library will return with
a reference to the child process.

```js

import * as gs from 'generic-subshell';  // using es5 it's: const gs = require('generic-subshell');

const commands = [
  'echo "foo"', 
  'echo "baz"', 
  'echo "bar"'
  ];

const k = gs.run(commands);  // returns a child process

k.once('exit', function(code){
    // if code is 0, all subshells exited with code 0
    // if code is 1, at least one subshell exited with an non-zero code
});

```

# Installation:

```bash
npm install generic-subshell --save

```

---
_Source: https://npm.io/package/generic-subshell · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
