{"id":22967786,"url":"https://github.com/jabolopes/par","last_synced_at":"2026-04-29T18:31:21.381Z","repository":{"id":212990074,"uuid":"647428727","full_name":"jabolopes/par","owner":"jabolopes","description":"Run commands from stdin in parallel","archived":false,"fork":false,"pushed_at":"2023-12-17T19:23:13.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T19:49:26.330Z","etag":null,"topics":["concurrency","go","golang","parallel","shell","xargs"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jabolopes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-05-30T19:05:36.000Z","updated_at":"2023-12-17T18:12:43.000Z","dependencies_parsed_at":"2024-01-08T19:10:14.251Z","dependency_job_id":null,"html_url":"https://github.com/jabolopes/par","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"a395564e6b35d4192651b1864fb665c7744dc727"},"previous_names":["jabolopes/par"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jabolopes%2Fpar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jabolopes%2Fpar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jabolopes%2Fpar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jabolopes%2Fpar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jabolopes","download_url":"https://codeload.github.com/jabolopes/par/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246758593,"owners_count":20828957,"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","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":["concurrency","go","golang","parallel","shell","xargs"],"created_at":"2024-12-14T21:14:44.984Z","updated_at":"2026-04-29T18:31:16.325Z","avatar_url":"https://github.com/jabolopes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# par\n\nRun commands from stdin in parallel.\n\nEach command is a single line terminated by the newline character (`\\n`).\n\nBy default, the commands are run in a shell. The default number of\nparallel processes equals the number of CPUs (or cores).\n\nThe flag `-n` enables dry run mode: commands are printed to `stderr`\nbut not run.\n\nThe flag `-v` enables verbose mode: commands are printed to `stderr`\nwhen run.\n\n## Installation\n\n```shell\n$ go install github.com/jabolopes/par\n```\n\n## Example\n\nCopy and convert a bunch of CR2 photographs to JPEG in parallel:\n\n```shell\n$ for i in *.CR2; do echo convert /run/media/$USER/EOS_DIGITAL/DCIM/100EOS5D/$i ~/fotos/$(basename $i | sed -n \"s/CR2$/jpg/p\"); done | par -v\n```\n\n## Alternatives\n\n\u003e Why not `xargs`?\n\nI can never remember the `xargs` flags by heart and the defaults seem\nto be opposite of what I'm trying to achieve in terms of\nparallelization. Also, subshelling doesn't work as expected since the\nsubshelling occurs before `xargs` executes not after, therefore,\nsubshelling cannot use the items read by `xargs`. There's probably a\nsolution to that problem but I didn't figure it out.\n\n\u003e Why not GNU `parallel`?\n\nIn addition to the same subshelling problem as `xargs`, there's also\nthe issues [1](https://news.ycombinator.com/item?id=15319715),\n[2](https://bugs.launchpad.net/ubuntu/+source/parallel/+bug/1779764),\nand [3](https://github.com/NixOS/nixpkgs/issues/110584), etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjabolopes%2Fpar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjabolopes%2Fpar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjabolopes%2Fpar/lists"}