{"id":21806841,"url":"https://github.com/roguh/parallelly","last_synced_at":"2025-08-31T03:41:22.919Z","repository":{"id":89928028,"uuid":"427506537","full_name":"roguh/parallelly","owner":"roguh","description":"Run commands in parallel and capture output. Notify on each completion.","archived":false,"fork":false,"pushed_at":"2023-04-11T00:48:56.000Z","size":202,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-29T07:13:40.993Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roguh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-12T21:58:49.000Z","updated_at":"2022-01-02T21:55:59.000Z","dependencies_parsed_at":"2023-05-30T13:30:26.795Z","dependency_job_id":null,"html_url":"https://github.com/roguh/parallelly","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/roguh/parallelly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roguh%2Fparallelly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roguh%2Fparallelly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roguh%2Fparallelly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roguh%2Fparallelly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roguh","download_url":"https://codeload.github.com/roguh/parallelly/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roguh%2Fparallelly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272936300,"owners_count":25018160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-27T12:30:26.470Z","updated_at":"2025-08-31T03:41:22.892Z","avatar_url":"https://github.com/roguh.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parallelly: Run commands in parallel and capture output. Notify on each completion.\n\n\u003c!--\nEDIT README.template.md, not README.md directly.\nUse `make build-readme to update the README file\n--\u003e\n\nAdd synchronized swimming to your CLI!\n\n## Usage\n\nSee [demos at bottom of document](#demos) for examples with output.\n\n```\nDescription:\n    Run commands in parallel and capture output. Notify on each completion.\n\n    - Notify if a command succeeds (status code 0) or fails (non-zero status code).\n    - Save command outputs to a temporary directory.\n    - Print command output if the command fails.\n    - (Optional) Print command output if the command succeeds.\n    - Print line count of command output.\n    - Measures total runtime.\n    - Measures runtime of each command.\n\n    See examples in section below.\n\nUSAGE:\n    parallelly -h|--help|-v|--version|\u003cother options\u003e [cmd_name cmd_with_arguments]+\n\n    One or more pairs of cmd_name followed by cmd_with_arguments are expected.\n\n    cmd_name             A short and filesafe name for the following command.\n                         Used in notifications and files storing output.\n                         A cmd_with_arguments should always follow these args.\n    cmd_with_arguments   An escaped command to run in parallel\n\n    -h|--help            Print this message.\n    -v|--version         Print version of this script.\n\nConfiguration:\n  Options take priority over environment variables.\n  Options can go in between a name and its command.\n  Use --show-configuration or --verbose to see configuration.\n\n  Output configuration:\n    --verbose|-V|--no-verbose or set $PARALLELLY_VERBOSE_OUTPUT=true:\n        Whether to print verbose logs.\n        If colors are enabled, logs are colored.\n        Default: false or value of $VERBOSE if it is set\n    --all-output|-a|--not-all-output or set $PARALLELLY_SHOW_ALL_OUTPUT=true:\n        Whether to print command output for successful commands too.\n        Default: false or value of $ALL_OUTPUT if it is set\n    --emoji|-e|--no-emoji|-z or set $PARALLELLY_EMOJI_OUTPUT=true:\n        Whether to print emoji.\n        Use --no-emoji if you see tofu characters (empty boxes), such as\n        '' '' '�' '�'\n        Default: true if output is a tty and $DISPLAY is set, false otherwise.\n    --color|-c|--no-color|-n or set $ENABLE_COLORS=true: \n        If enabled, errors are colored.\n        If enabled, verbose logs are colored.\n        If enabled, some other logs are underemphasized.\n          This color may not show up well on a light background.\n          Use --light-mode in this case.\n        Default: true only if\n            - output is a tty and tput colors\u003e=8, false otherwise.\n            - tput is installed\n            - tput colors\u003e=8\n          tput colors = 8\n          is a tty = no\n    --light-mode|--no-light-mode or set $LIGHT_MODE=true: \n    --command-output-command|--cc or set $SHOW_CMD_OUTPUT_CMD:\n        Command for printing stderr and stdout of a command\n        If this argument is passed, --cc-args is set to '' by default.\n        Make sure to pass --cc-args AFTER this argument.\n        Default: tail\n    --command-output-command-args|--cc-args or set $SHOW_CMD_OUTPUT_CMD_ARGS:\n        Arguments for command for printing stderr and stdout of a command\n        Default: -n1\n    --tmp-dir or set $PARALLELLY_TMP_DIR:\n        If you don't have mktemp on your system, you must set this\n        option with the environment variable!\n        Note: parallelly usually needs a tmp directory to parse its arguments!\n        Alternative: set $MK_TEMP and $MK_TEMP_ARGS\n        Default: created using mktemp\n    --line-count|--no-line-count or set $SHOW_LINE_COUNT:\n        Whether to show line count.\n        Default: true\n    --byte-count|--no-byte-count or set $SHOW_BYTE_COUNT:\n        Whether to show byte count.\n        Default: true\n    --human-readable-byte-count|-H|--raw-byte-count or set $HUMAN_READABLE_BYTE_COUNT:\n        Whether to show byte count in binary prefixes, such as 10MiB.\n  Running commands configuration:\n    --sequential|-s|--no-sequential or set $FORCE_SEQUENTIAL=true:\n        Run commands sequentially instead of in parallel.\n        Useful if you just want to capture output and get notifications.\n        Default: false\n    --shell-command or set $CMD_SHELL:\n        Which shell to run the commands in.\n        Special value: RAW.\n          Run the commands directly, without using a shell.\n          Does not work on ZSH.\n          Use only if you know what you're doing.\n        Default: sh\n    --shell-command-args or set $CMD_SHELL_ARGS:\n        Arguments to pass to the shell\n        Default: -c\n  Notifications configuration:\n    --notify-command or set $NOTIFY_COMMAND:\n        Command to notify when a command succeeds.\n        Should take two arguments, each possibly containing spaces.\n        First argument is title, second is a description.\n        Default: echo if $CLI_NOTIFY is false, GUI command otherwise.\n    --failure-notify-command or set $FAILURE_NOTIFY_COMMAND:\n        Command to notify when a command fails.\n        Should take two arguments, each possibly containing spaces.\n        First argument is title, second is a description.\n        Default: echo if $CLI_NOTIFY is false, more visible GUI command otherwise.\n    --notify-command-args or set $NOTIFY_COMMAND_ARGS\n    --failure-notify-command-args or set $FAILURE_NOTIFY_COMMAND_ARGS\n\n  Debug only:\n    --show-configuration or set $SHOW_CONFIGURATION=true:\n        Print configuration.\n    --show-pids or set $SHOW_PIDS=true:\n        Print process IDs of background jobs.\n        Incompatible with --sequential.\n    --debug or set $DEBUG=true\n    --trace or set $TRACE=true:\n        Run 'set -x'\n\nExit codes:\n    Exit code 0 is success.\n    Exit code 22 indicates some or all commands failed.\n    Other exit codes range from 55 to 99.\n    See source code for an enumeration of all possible exit codes.\n\nExamples:\n\n  A command without arguments:\n    parallelly list-files ls\n\n  Verbose output and a command without arguments:\n    parallelly -V list-files ls\n    parallelly list-files ls -V\n    parallelly list-files -V ls\n    VERBOSE=true parallelly list-files ls\n    PARALLELLY_VERBOSE_OUTPUT=true parallelly list-files ls\n\n  A command with arguments:\n    parallelly rsync-src 'rsync -rhP src backup'\n\n  A command with arguments that have spaces in them:\n    parallelly printf-abc 'printf \"%s %s\" abc 123'\n\n  Show more or all command output\n    parallelly multi-line-output --all-output --cc-args '-n5' 'echo 1; echo 2; echo 3; printf \"%s %s\" abc 123'\n    parallelly multi-line-output --all-output --cc cat --cc-args '' 'echo 1; echo 2; echo 3; printf \"%s %s\" abc 123'\n\n  Shell commands:\n    parallelly test-exit 'echo failure \u0026\u0026 exit 1'\n    parallelly test-statement 'if true; then echo 1; fi'\n\n    Commands are run in the sh by default shell with: sh -c \"$COMMAND\"\n\n  Commands are waited one at a time in order:\n    This means that you should list the fast commands first.\n    VERBOSE=true parallelly 1 'sleep 0.1' 2 'sleep 1' 3 'sleep 2'\n\n    Or else, it'll take a bit longer to see successful outputs.\n    VERBOSE=true parallelly 3 'sleep 2' 2 'sleep 1' 1 'sleep 0.1'\n\n    Regardless, you are notified as soon as a command finishes.\n    VERBOSE=true CLI_NOTIFY=true parallelly 3 'sleep 2' 2 'sleep 1' 1 'sleep 0.1'\n\n  Multiple commands:\n    parallelly fail 'echo failure \u0026\u0026 exit 1' \\\n      fail-printf-nonewline 'printf \"%s %s\"\\ abc 123 ; false' \\\n      fail-rsync-src 'rsync -rhP nonexistentdir backup' \\\n      delay 'sleep 0.2' \\\n      ok-and-output 'echo test ; echo stderr test \u003e\u00262' \\\n      fail-slower-delay '! sleep 0.4' \\\n      fail-no-output 'exit 210' \\\n      lots-of-output 'cat $(which parallelly)' \\\n      'long name for command with spaces' 'true \u0026\u0026 echo ok'\n\n    The odd numbered arguments are short, filesafe names for each command.\n    The names are used in notifications and files storing outout.\n\nAdd synchronized swimming to your CLI!\nVersion: 1.11.2\n\n```\n\n## Installation\n\n### Option 1:\n\n1. Download [raw.githubusercontent.com/roguh/parallelly/main/parallelly](https://raw.githubusercontent.com/roguh/parallelly/main/parallelly).\n2. Make executable and move to your preferred binary location.\n\n```\nchmod +x parallelly\nsudo cp parallelly /usr/bin/parallelly\n```\n\n### Option 2:\n\n```\ngit clone https://github.com/roguh/parallelly.git\ncd parallelly\nmake install\n```\n\nOR\n\n```\ngit clone https://github.com/roguh/parallelly.git\ncd parallelly\nmake install-to-user\n```\n\nOR\n\n```\ngit clone https://github.com/roguh/parallelly.git\ncd parallelly\nmake install-symlink-to-user\n```\n\n## Tests\n\nRun `make build-readme` to run various tests.\n\nOutput will be found in generated README.md file.\n\n## Compatibility testing\n\n### Linux\n\nTested on Manjaro using GNU coreutils 9.0 in these shells:\n\n- dash 0.5\n- bash 5.1\n- bash 5.1 in bash 3.1 compatibility mode `BASH_COMPAT=31`\n- zsh 5.8\n- yash 2.52\n- ksh version 2020.0.0\n\nTested in various shells:\n\n- kitty 0.23.1\n- xterm 369\n- Termux terminal emulator 0.117\n\nTested on two OSs:\n\n- Manjaro Linux (updated as of 2021.11)\n- Termux 0.117 on Android 12\n\n### MacOS\n\nNot tested on MacOS, yet. It might work fine because it is tested on ZSH.\nYou will need to set the notify commands if you don't have `notify-send`.\n\n## Linting and Compatibility Check\n\nUse shellcheck to check shellscripts.\n\n```\nmake check\n```\n\n## Demos\n\nThe parallelly commands start with a `$ ` to indicate it is a command typed into the shell.\nThe rest of the code is the output of the command.\n\n\n### Demo 1: basic usage\n\n\nParallelly runs multiple commands in parallel and captures their output.\nYou pass it pairs of arguments: a name for the command and the command itself.\n\nFailing command output is summarized with `tail -n1` and a list of\ncommand names that failed is listed at the end.\nBy default, successful command output is not shown.\nTiming information is shown for each command and for total runtime.\n\nSome of the commands that were run are indicated by a leading `+ `, such as `+ tail -n1` for showing output and the command itself.\n\nNotice that command output is save in a temporary directory.\n\n```\n$ parallelly \\\n    long-running 'echo OK \u003e\u00262 \u0026\u0026 sleep 0.25' \\\n    lots-of-output 'cat $(which parallelly)' \\\n    failing 'echo ERROR ; exit 1'\nparallelly will run 3 commands in parallel \n============= Failed command output =============\nERROR Failure in command failing after 0.0 seconds.\n+ echo ERROR ; exit 1\n/tmp/demo-tmp-dir-24e84ee24f/parallelly-logs/failing.stderr\n/tmp/demo-tmp-dir-24e84ee24f/parallelly-logs/failing.stdout\nSTDERR output for failed command failing: (no output)\nSTDOUT output for failed command failing: 6 bytes 1 line\n+ tail -n1 /tmp/demo-tmp-dir-24e84ee24f/parallelly-logs/failing.stdout\nERROR\n3 commands finished in 0.6 seconds.\nERROR 1 command failed: failing \n\n```\n\n### Demo 2: speedup demo\n\n\nHere, we're going to run ten sleep 0.1 commands in parallel and then sequentially to compare the runtime.\n\n```\n$ parallelly \\\n    sleep1 'sleep 0.1' \\\n    sleep2 'sleep 0.1' \\\n    sleep3 'sleep 0.1' \\\n    sleep4 'sleep 0.1' \\\n    sleep5 'sleep 0.1' \\\n    sleep6 'sleep 0.1' \\\n    sleep7 'sleep 0.1' \\\n    sleep8 'sleep 0.1' \\\n    sleep9 'sleep 0.1' \\\n    sleep0 'sleep 0.1'\nparallelly will run 10 commands in parallel \n10 commands finished in 0.5 seconds.\n+ echo\n\n$ parallelly \\\n    --sequential sleep1 'sleep 0.1' \\\n    sleep2 'sleep 0.1' \\\n    sleep3 'sleep 0.1' \\\n    sleep4 'sleep 0.1' \\\n    sleep5 'sleep 0.1' \\\n    sleep6 'sleep 0.1' \\\n    sleep7 'sleep 0.1' \\\n    sleep8 'sleep 0.1' \\\n    sleep9 'sleep 0.1' \\\n    sleep0 'sleep 0.1'\nparallelly will run 10 commands sequentially \nFORCE_SEQUENTIAL is set: Waiting for command sleep1 to finish\nFORCE_SEQUENTIAL is set: Waiting for command sleep2 to finish\nFORCE_SEQUENTIAL is set: Waiting for command sleep3 to finish\nFORCE_SEQUENTIAL is set: Waiting for command sleep4 to finish\nFORCE_SEQUENTIAL is set: Waiting for command sleep5 to finish\nFORCE_SEQUENTIAL is set: Waiting for command sleep6 to finish\nFORCE_SEQUENTIAL is set: Waiting for command sleep7 to finish\nFORCE_SEQUENTIAL is set: Waiting for command sleep8 to finish\nFORCE_SEQUENTIAL is set: Waiting for command sleep9 to finish\nFORCE_SEQUENTIAL is set: Waiting for command sleep0 to finish\n10 commands finished in 1.3 seconds.\n\n```\n\n### Demo 3: show output for all commands\n\n\nUse `-a` to show output for successful commands as well.\n\n```\n$ parallelly \\\n    -a long-running 'echo OK \u003e\u00262 \u0026\u0026 sleep 0.25' \\\n    lots-of-output 'cat $(which parallelly)' \\\n    failing 'echo ERROR ; exit 1'\nparallelly will run 3 commands in parallel \n============= Successful command(s) =============\nCommand long-running succeeded in 0.2 seconds.\n+ echo OK \u003e\u00262 \u0026\u0026 sleep 0.25\n/tmp/demo-tmp-dir-ca128f1014/parallelly-logs/long-running.stderr\n/tmp/demo-tmp-dir-ca128f1014/parallelly-logs/long-running.stdout\nSTDERR output for successful command long-running: 3 bytes 1 line\n+ tail -n1 /tmp/demo-tmp-dir-ca128f1014/parallelly-logs/long-running.stderr\nOK\nSTDOUT output for successful command long-running: (no output)\n\nCommand lots-of-output succeeded in 0.0 seconds.\n+ cat $(which parallelly)\n/tmp/demo-tmp-dir-ca128f1014/parallelly-logs/lots-of-output.stderr\n/tmp/demo-tmp-dir-ca128f1014/parallelly-logs/lots-of-output.stdout\nSTDERR output for successful command lots-of-output: (no output)\nSTDOUT output for successful command lots-of-output: 36.84 KiBs 1162 lines\n+ tail -n1 /tmp/demo-tmp-dir-ca128f1014/parallelly-logs/lots-of-output.stdout\n# End of parallelly script\n\n============= Failed command output =============\nERROR Failure in command failing after 0.0 seconds.\n+ echo ERROR ; exit 1\n/tmp/demo-tmp-dir-ca128f1014/parallelly-logs/failing.stderr\n/tmp/demo-tmp-dir-ca128f1014/parallelly-logs/failing.stdout\nSTDERR output for failed command failing: (no output)\nSTDOUT output for failed command failing: 6 bytes 1 line\n+ tail -n1 /tmp/demo-tmp-dir-ca128f1014/parallelly-logs/failing.stdout\nERROR\n3 commands finished in 0.8 seconds.\nERROR 1 command failed: failing \n\n```\n\n### Demo 4: verbose mode for even more output\n\n\nUse `-V` to show more detailed output.\nIt is helpful to use it in conjunction with `-a`.\n\nNotice that the files where output is being saved are printed as soon as the command is started.\nYou can use `tail -f \u003cOUTPUT FILE\u003e` to see the output of a long-lived command.\n\nLook for \"Starting \" and \"See output at:\" near the top of the logs\n\n```\n$ parallelly \\\n    -V -a long-running 'echo OK \u003e\u00262 \u0026\u0026 sleep 0.25' \\\n    lots-of-output 'cat $(which parallelly)' \\\n    failing 'echo ERROR ; exit 1'\nCreated tmp directory at /tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs\n============= Configuration =============\nEnvironment variables may have been overridden by command line options.\n\nPARALLELLY_VERBOSE_OUTPUT=true\nPARALLELLY_SHOW_ALL_OUTPUT=true\nPARALLELLY_EMOJI_OUTPUT=false\nCMD_SHELL=sh\nCMD_SHELL_ARGS=-c\nFORCE_SEQUENTIAL=false\nSHOW_CMD_OUTPUT_CMD=tail\nSHOW_CMD_OUTPUT_CMD_ARGS=-n1\nPARALLELLY_TMP_DIR=/tmp/demo-tmp-dir-86b09d2f5f\nSHOW_LINE_COUNT=true\nSHOW_BYTE_COUNT=true\nHUMAN_READABLE_BYTE_COUNT=true\nNOTIFY_COMMAND=true\nFAILURE_NOTIFY_COMMAND=true\nNOTIFY_COMMAND_ARGS=\nFAILURE_NOTIFY_COMMAND_ARGS=\nENABLE_COLORS=false\nLIGHT_MODE=false\nSHOW_CONFIGURATION=false\nSHOW_PIDS=false\nTemporary directory CMD_OUT_DIR=/tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs\n\nparallelly will run 3 commands in parallel \n============= Starting commands =============\nStarting long-running command 1/3\n+ sh -c echo OK \u003e\u00262 \u0026\u0026 sleep 0.25\nSee output at:\n/tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/long-running.stderr\n/tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/long-running.stdout\nStarting lots-of-output command 2/3\n+ sh -c cat $(which parallelly)\nSee output at:\n/tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/lots-of-output.stderr\n/tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/lots-of-output.stdout\nStarting failing command 3/3\n+ sh -c echo ERROR ; exit 1\nSee output at:\n/tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/failing.stderr\n/tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/failing.stdout\n\n============= Waiting for commands to finish =============\nWill list successful and failed commands.\n\n============= Successful command(s) =============\nCommand long-running succeeded in 0.2 seconds.\n+ echo OK \u003e\u00262 \u0026\u0026 sleep 0.25\n/tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/long-running.stderr\n/tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/long-running.stdout\nSTDERR output for successful command long-running: 3 bytes 1 line\n+ tail -n1 /tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/long-running.stderr\nOK\nSTDOUT output for successful command long-running: (no output)\n\nCommand lots-of-output succeeded in 0.0 seconds.\n+ cat $(which parallelly)\n/tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/lots-of-output.stderr\n/tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/lots-of-output.stdout\nSTDERR output for successful command lots-of-output: (no output)\nSTDOUT output for successful command lots-of-output: 36.84 KiBs 1162 lines\n+ tail -n1 /tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/lots-of-output.stdout\n# End of parallelly script\n\n============= Failed command output =============\nERROR Failure in command failing after 0.0 seconds.\n+ echo ERROR ; exit 1\n/tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/failing.stderr\n/tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/failing.stdout\nSTDERR output for failed command failing: (no output)\nSTDOUT output for failed command failing: 6 bytes 1 line\n+ tail -n1 /tmp/demo-tmp-dir-86b09d2f5f/parallelly-logs/failing.stdout\nERROR\n\n============= SUMMARY =============\n2 commands succeeded\n3 commands finished in 0.8 seconds.\nERROR 1 command failed: failing \n\n```\n\n### Demo 5: more output or all output\n\n\nTo show more output, or all output use the `--command-output-command or --c`\nand `--command-output-command-args or --cc-args` arguments.\nYou can use `cat` to show all output or `tail -n10` to show the last 10 lines.\n\nBy default, only the last line of output is shown.\n\n```\n$ parallelly \\\n    -a onlylastline 'printf \"a\\nb\\nc\\nd\\ne\"'\nparallelly will run 1 commands in parallel \n============= Successful command(s) =============\nCommand onlylastline succeeded in 0.0 seconds.\n+ printf \"a\\nb\\nc\\nd\\ne\"\n/tmp/demo-tmp-dir-71ab5eeb4a/parallelly-logs/onlylastline.stderr\n/tmp/demo-tmp-dir-71ab5eeb4a/parallelly-logs/onlylastline.stdout\nSTDERR output for successful command onlylastline: (no output)\nSTDOUT output for successful command onlylastline: 9 bytes 4 lines\n+ tail -n1 /tmp/demo-tmp-dir-71ab5eeb4a/parallelly-logs/onlylastline.stdout\ne\n(no newline at end of output)\n\n1 command finished in 0.2 seconds.\n+ echo\n\n$ parallelly \\\n    --cc-args -n3 -a last3lines 'printf \"a\\nb\\nc\\nd\\ne\"'\nparallelly will run 1 commands in parallel \n============= Successful command(s) =============\nCommand last3lines succeeded in 0.0 seconds.\n+ printf \"a\\nb\\nc\\nd\\ne\"\n/tmp/demo-tmp-dir-71ab5eeb4a/parallelly-logs/last3lines.stderr\n/tmp/demo-tmp-dir-71ab5eeb4a/parallelly-logs/last3lines.stdout\nSTDERR output for successful command last3lines: (no output)\nSTDOUT output for successful command last3lines: 9 bytes 4 lines\n+ tail -n3 /tmp/demo-tmp-dir-71ab5eeb4a/parallelly-logs/last3lines.stdout\nc\nd\ne\n(no newline at end of output)\n\n1 command finished in 0.2 seconds.\n+ echo\n\n$ parallelly \\\n    --cc cat -a last3lines 'printf \"a\\nb\\nc\\nd\\ne\"'\nparallelly will run 1 commands in parallel \n============= Successful command(s) =============\nCommand last3lines succeeded in 0.0 seconds.\n+ printf \"a\\nb\\nc\\nd\\ne\"\n/tmp/demo-tmp-dir-71ab5eeb4a/parallelly-logs/last3lines.stderr\n/tmp/demo-tmp-dir-71ab5eeb4a/parallelly-logs/last3lines.stdout\nSTDERR output for successful command last3lines: (no output)\nSTDOUT output for successful command last3lines: 9 bytes 4 lines\n+ cat  /tmp/demo-tmp-dir-71ab5eeb4a/parallelly-logs/last3lines.stdout\na\nb\nc\nd\ne\n(no newline at end of output)\n\n1 command finished in 0.1 seconds.\n\n```\n\n### Demo 6: no emoji and no colors\n\n\nParallelly prints emoji and colors when it seems they could be supported.\nTo turn them off, use `--no-color` and `--no-emoji`.\n\n```\n$ parallelly \\\n    --no-color --no-emoji -a long-running 'echo OK \u003e\u00262 \u0026\u0026 sleep 0.25' \\\n    lots-of-output 'cat $(which parallelly)' \\\n    failing 'echo ERROR ; exit 1'\nparallelly will run 3 commands in parallel \n============= Successful command(s) =============\nCommand long-running succeeded in 0.2 seconds.\n+ echo OK \u003e\u00262 \u0026\u0026 sleep 0.25\n/tmp/demo-tmp-dir-865db193fd/parallelly-logs/long-running.stderr\n/tmp/demo-tmp-dir-865db193fd/parallelly-logs/long-running.stdout\nSTDERR output for successful command long-running: 3 bytes 1 line\n+ tail -n1 /tmp/demo-tmp-dir-865db193fd/parallelly-logs/long-running.stderr\nOK\nSTDOUT output for successful command long-running: (no output)\n\nCommand lots-of-output succeeded in 0.0 seconds.\n+ cat $(which parallelly)\n/tmp/demo-tmp-dir-865db193fd/parallelly-logs/lots-of-output.stderr\n/tmp/demo-tmp-dir-865db193fd/parallelly-logs/lots-of-output.stdout\nSTDERR output for successful command lots-of-output: (no output)\nSTDOUT output for successful command lots-of-output: 36.84 KiBs 1162 lines\n+ tail -n1 /tmp/demo-tmp-dir-865db193fd/parallelly-logs/lots-of-output.stdout\n# End of parallelly script\n\n============= Failed command output =============\nERROR Failure in command failing after 0.0 seconds.\n+ echo ERROR ; exit 1\n/tmp/demo-tmp-dir-865db193fd/parallelly-logs/failing.stderr\n/tmp/demo-tmp-dir-865db193fd/parallelly-logs/failing.stdout\nSTDERR output for failed command failing: (no output)\nSTDOUT output for failed command failing: 6 bytes 1 line\n+ tail -n1 /tmp/demo-tmp-dir-865db193fd/parallelly-logs/failing.stdout\nERROR\n3 commands finished in 0.8 seconds.\nERROR 1 command failed: failing \n\n```\n\n### Demo 7: sequential mode\n\n\nParallelly supports `--sequential or -s` to run commands sequentially instead of in parallel.\nThis is useful for testing and comparison purposes.\nAlso, you can use this mode to just capture output and notify on completion.\n\n```\n$ parallelly \\\n    --sequential -a long-running 'echo OK \u003e\u00262 \u0026\u0026 sleep 0.25' \\\n    lots-of-output 'cat $(which parallelly)' \\\n    failing 'echo ERROR ; exit 1'\nparallelly will run 3 commands sequentially \nFORCE_SEQUENTIAL is set: Waiting for command long-running to finish\nFORCE_SEQUENTIAL is set: Waiting for command lots-of-output to finish\nFORCE_SEQUENTIAL is set: Waiting for command failing to finish\n============= Successful command(s) =============\nCommand long-running succeeded in 0.2 seconds.\n+ echo OK \u003e\u00262 \u0026\u0026 sleep 0.25\n/tmp/demo-tmp-dir-9c3727b652/parallelly-logs/long-running.stderr\n/tmp/demo-tmp-dir-9c3727b652/parallelly-logs/long-running.stdout\nSTDERR output for successful command long-running: 3 bytes 1 line\n+ tail -n1 /tmp/demo-tmp-dir-9c3727b652/parallelly-logs/long-running.stderr\nOK\nSTDOUT output for successful command long-running: (no output)\n\nCommand lots-of-output succeeded in 0.0 seconds.\n+ cat $(which parallelly)\n/tmp/demo-tmp-dir-9c3727b652/parallelly-logs/lots-of-output.stderr\n/tmp/demo-tmp-dir-9c3727b652/parallelly-logs/lots-of-output.stdout\nSTDERR output for successful command lots-of-output: (no output)\nSTDOUT output for successful command lots-of-output: 36.84 KiBs 1162 lines\n+ tail -n1 /tmp/demo-tmp-dir-9c3727b652/parallelly-logs/lots-of-output.stdout\n# End of parallelly script\n\nCommand failing succeeded in 0.0 seconds.\n+ echo ERROR ; exit 1\n/tmp/demo-tmp-dir-9c3727b652/parallelly-logs/failing.stderr\n/tmp/demo-tmp-dir-9c3727b652/parallelly-logs/failing.stdout\nSTDERR output for successful command failing: (no output)\nSTDOUT output for successful command failing: 6 bytes 1 line\n+ tail -n1 /tmp/demo-tmp-dir-9c3727b652/parallelly-logs/failing.stdout\nERROR\n\n3 commands finished in 0.9 seconds.\n\n```\n\n### Demo 8: misc arguments\n\n\nYou can show the configuration, the version, or debug information easily.\nYou can also disable emoji, set the shell used, e.g. to bash, zsh, or fish,\nchange the arguments passed to tail, and other options.\nUse --help to see all options.\n\n```\n$ parallelly --trace  # Very noisy!\n$ parallelly \\\n    --show-configuration\n============= Configuration =============\nEnvironment variables may have been overridden by command line options.\n\nPARALLELLY_VERBOSE_OUTPUT=false\nPARALLELLY_SHOW_ALL_OUTPUT=false\nPARALLELLY_EMOJI_OUTPUT=false\nCMD_SHELL=sh\nCMD_SHELL_ARGS=-c\nFORCE_SEQUENTIAL=false\nSHOW_CMD_OUTPUT_CMD=tail\nSHOW_CMD_OUTPUT_CMD_ARGS=-n1\nPARALLELLY_TMP_DIR=/tmp/demo-tmp-dir-8836bf85cb\nSHOW_LINE_COUNT=true\nSHOW_BYTE_COUNT=true\nHUMAN_READABLE_BYTE_COUNT=true\nNOTIFY_COMMAND=true\nFAILURE_NOTIFY_COMMAND=true\nNOTIFY_COMMAND_ARGS=\nFAILURE_NOTIFY_COMMAND_ARGS=\nENABLE_COLORS=false\nLIGHT_MODE=false\nSHOW_CONFIGURATION=true\nSHOW_PIDS=false\nTemporary directory CMD_OUT_DIR=(unset!)\n\n$ parallelly \\\n    --no-emoji --light-mode --shell-command bash --cc tail --cc-args -n10 --show-configuration\n============= Configuration =============\nEnvironment variables may have been overridden by command line options.\n\nPARALLELLY_VERBOSE_OUTPUT=false\nPARALLELLY_SHOW_ALL_OUTPUT=false\nPARALLELLY_EMOJI_OUTPUT=false\nCMD_SHELL=bash\nCMD_SHELL_ARGS=-c\nFORCE_SEQUENTIAL=false\nSHOW_CMD_OUTPUT_CMD=tail\nSHOW_CMD_OUTPUT_CMD_ARGS=-n10\nPARALLELLY_TMP_DIR=/tmp/demo-tmp-dir-8836bf85cb\nSHOW_LINE_COUNT=true\nSHOW_BYTE_COUNT=true\nHUMAN_READABLE_BYTE_COUNT=true\nNOTIFY_COMMAND=true\nFAILURE_NOTIFY_COMMAND=true\nNOTIFY_COMMAND_ARGS=\nFAILURE_NOTIFY_COMMAND_ARGS=\nENABLE_COLORS=false\nLIGHT_MODE=true\nSHOW_CONFIGURATION=true\nSHOW_PIDS=false\nTemporary directory CMD_OUT_DIR=(unset!)\n\n$ parallelly \\\n    --version\n1.11.2\n$ parallelly \\\n    --debug\nDEBUG: arglog: Remaining (0)\nDEBUG: PPID=\u003comitted\u003e\nDEBUG: Parent process name: bash\nDEBUG: Is a TTY: false\nDEBUG: Colors supported: 0\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froguh%2Fparallelly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froguh%2Fparallelly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froguh%2Fparallelly/lists"}