GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ORESoftware/generic-subshell: Bash API and Node.js interface for running dynamic number of subshells in parallel and collecting all exit codes.

BranchesTags
Open more actions menu

Latest commit

 

History

18 Commits
18 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
lib
lib
 
 
scripts
scripts
 
 
test
test
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
index.js
index.js
 
 
index.ts
index.ts
 
 
package.json
package.json
 
 
suman.conf.js
suman.conf.js
 
 
tsconfig-test.json
tsconfig-test.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

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.

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:

npm install generic-subshell --save

About

Bash API and Node.js interface for running dynamic number of subshells in parallel and collecting all exit codes.

Topics

bashbash-scriptbash-scriptinggenericnodejsparallelismshellshell-scriptsubshell

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.