Socket
Socket
Sign inDemoInstall

bad

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bad - npm Package Compare versions

Comparing version 0.8.3 to 0.8.4

18

bin/bad.js

@@ -39,2 +39,6 @@ #!/usr/bin/env node

.version(require('../package.json').version)
.description(
'bad is a command line tool that allows you to execute a command multiple '
+'times concurrently for a given number of subjects.'
)
.usage('--exec my-command --for "1 2 3 4"')

@@ -44,12 +48,12 @@ .option('--verbose', 'show the output verbosley.')

.option('--exec <command>', 'the command to run. This is passed directly to spawn.')
.option('--for <subjects>'
, 'a whitespace separated list of subjects.'
+ ' Each subject is appended to argv except when --to-env is given.'
, splitSpaceDelimted
)
.option('--argv [args]'
, 'whitespace separated arguments to pass to the command.'
+ 'Subject matter is added to the end of the list when --to-env is not used.'
, 'a whitespace separated list of arguments to pass to the command.'
, splitSpaceDelimted
)
.option('--to-env [varname]', 'an env var representing the subject for the command.')
.option('--for <subjects>'
, 'a white space separated list of arguments.'
+ 'Each arg is passed to the command as it\'s first arg.'
, splitSpaceDelimted);
.option('--to-env [varname]', 'an env var representing the subject for the command.');

@@ -56,0 +60,0 @@ program.parse(process.argv);

{
"name": "bad",
"version": "0.8.3",
"description": "A command line tool to execute a command multiple times for a given array.",
"version": "0.8.4",
"description": "A CLI tool to execute a command concurrently for a given number of subjects.",
"preferGlobal": true,

@@ -6,0 +6,0 @@ "bin": {

@@ -5,34 +5,30 @@ bad

`bad` is a CLI tool that allows you to execute a command multiple times concurrently
for a given number of subjects.
`bad` is a command line tool that allows you to execute a command multiple times
concurrently for a given number of subjects.
`bad` is general enough for just about anything that requires parallel execution,
and it's also *bad* enough to accomplish it with ease!
##Usage
````
Usage: bad --exec my-command --for "1 2 3 4"
Usage: bad --exec my-command --for "1 2 3 4"
Options:
Options:
-h, --help output usage information
-V, --version output the version number
--verbose show the output verbosley.
-s, --silent show as little as possible.
--exec <command> the command to run. This is passed directly to spawn.
--for <subjects> a whitespace separated list of subjects.
Each subject is appended to argv except when --to-env is given.
--argv [args] a whitespace separated list of arguments to pass to the command.
--to-env [varname] an env var representing the subject for the command.
-h, --help output usage information
-V, --version output the version number
--verbose show the output verbosley.
-s, --silent show as little as possible.
--exec <command> the command to run. This is passed directly to spawn.
--to-env <varname> an env var representing the subject for the command.
--for <subjects> a white space separated list of arguments.
Each arg is passed to the command as it's first arg.
````
##Example
This would silently curn the given urls concurrently:
````
bad --exec echo --for "1 2 3 4"
bad --exec curl --argv '-s' --for "google.com linkedin.com npmjs.org"
````
This would print:
````
1
2
3
4
````
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc