# bad

> A CLI tool to execute a command concurrently for a given number of subjects.

Latest version **0.10.0** (published 2016-09-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install bad
pnpm add bad
yarn add bad
bun add bad
```

Provides the command `bad`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.10.0 |
| Published | 2016-09-14 |
| First published | 2014-03-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Joseph Spencer |
| Maintainers | jsdevel |
| Keywords | command, batch, cli, tty, tool, multiple, processes |

## Links

- npm: https://www.npmjs.com/package/bad
- Repository: https://github.com/jsdevel/node-bad
- Issues: https://github.com/jsdevel/node-bad/issues
- npm.io page: https://npm.io/package/bad

## Dependencies (4)

- [once](https://npm.io/package/once.md) ~1.3.0
- [async](https://npm.io/package/async.md) ~0.2.10
- [which](https://npm.io/package/which.md) ~1.0.5
- [commander](https://npm.io/package/commander.md) ~2.1.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.10.0 (latest) — 2016-09-14
- 0.9.3 — 2015-05-01
- 0.9.2 — 2014-03-28
- 0.9.1 — 2014-03-26
- 0.8.9 — 2014-03-26
- 0.8.8 — 2014-03-26
- 0.8.7 — 2014-03-26
- 0.8.6 — 2014-03-21
- 0.8.5 — 2014-03-21
- 0.8.4 — 2014-03-21
- 0.8.3 — 2014-03-21
- 0.8.2 — 2014-03-20
- 0.8.1 — 2014-03-20
- 0.8.0 — 2014-03-20
- 0.7.1 — 2014-03-20
- … 3 more at https://npm.io/package/bad/versions

## README

bad
======================
[![Build Status](https://travis-ci.org/jsdevel/node-bad.png)](https://travis-ci.org/jsdevel/node-bad)

`bad` is a command line tool that allows you to execute a command multiple times
concurrently for a given number of subjects.

It is general enough for just about anything that requires parallel execution,
and it's *bad* enough to accomplish it with ease!

##Why the name?
I couldn't think of anything better so I entered "batch command" at:
http://www.portmanteaur.com/?words=batch+command+node

`bad` stood out :)

##Usage
````
Usage: bad --exec curl --for "google.com linkedin.com" --argv "-s"

Options:

  -h, --help           output usage information
  -V, --version        output the version number
  --debug              print information for debugging
  -s, --silent         show as little as possible.
  --exec <command>     the command to run.  This is passed directly to spawn.
  --for <subjects>     a comma separated list of subject sets.
                       Each subject set is a whitespace separated list of subjects.
                       Subjects are appended to argv except when --to-env is given.
  --argv [args]        a whitespace separated list of arguments to pass to the command.
  --to-env <varnames>  a comma separated list of varname sets.
                       Each varname set is a whitespace separated list of varnames.
                       Varnames are mapped to the corresponding subject.
  --show-time          display time stats.

````

##Example
This would silently curl the given urls concurrently:
````
bad --exec curl --argv '-s' --for "google.com linkedin.com npmjs.org"
````

##Advanced mapping
You can map subjects to an environment variable using the `--to-env` flag.

Consider this example:
````
bad --exec echo --for '1 2, 3 4 5, 6' --to-env 'FOO DOO, XOO, ZOO'

....

#FOO set to 1
#DOO set to 2
#XOO set to 3
#XOO set to 4
#XOO set to 5
#ZOO set to 6
````

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