{"id":14008142,"url":"https://github.com/tomnomnom/comb","last_synced_at":"2025-10-09T23:35:14.917Z","repository":{"id":41271383,"uuid":"121954062","full_name":"tomnomnom/comb","owner":"tomnomnom","description":"Combine the lines from two files in every combination","archived":false,"fork":false,"pushed_at":"2018-02-18T17:49:46.000Z","size":3,"stargazers_count":50,"open_issues_count":0,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-18T07:50:40.209Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/tomnomnom.png","metadata":{"files":{"readme":"README.mkd","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}},"created_at":"2018-02-18T13:24:27.000Z","updated_at":"2025-02-12T09:24:23.000Z","dependencies_parsed_at":"2022-08-26T07:40:26.528Z","dependency_job_id":null,"html_url":"https://github.com/tomnomnom/comb","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Fcomb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Fcomb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Fcomb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Fcomb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomnomnom","download_url":"https://codeload.github.com/tomnomnom/comb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244902929,"owners_count":20529114,"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":[],"created_at":"2024-08-10T11:01:17.122Z","updated_at":"2025-10-09T23:35:09.897Z","avatar_url":"https://github.com/tomnomnom.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# comb\n\nCombine the lines from two files in every combination. Apparently that's\ncalled the cartesian product but don't quote me on that.\n\n## Install\n\n```\n▶ go get -u github.com/tomnomnom/comb\n```\n\nOr [download a binary](https://github.com/tomnomnom/comb/releases) and put\nit somewhere in your `$PATH` (e.g. `/usr/bin/comb`).\n\n## Usage\n\n```\n▶ comb -h\nCombine the lines from two files in every combination\n\nUsage:\n  comb [OPTIONS] \u003cprefixfile\u003e \u003csuffixfile\u003e\n\nOptions:\n  -f, --flip             Flip mode (order by suffix)\n  -s, --separator \u003cstr\u003e  String to place between prefix and suffix\n```\n\n## Example\n\nNormal mode:\n\n```\n▶ cat prefixes\n1\n2\n\n▶ cat suffixes\nA\nB\nC\n\n▶ comb prefixes suffixes\n1A\n1B\n1C\n2A\n2B\n2C\n```\n\nFlip mode (order by suffix):\n\n```\n▶ comb --flip prefixes suffixes\n1A\n2A\n1B\n2B\n1C\n2C\n```\n\nSeparator:\n\n```\n▶ comb --separator=\"-\" prefixes suffixes\n1-A\n1-B\n1-C\n2-A\n2-B\n2-C\n```\n\n## Can't you just do this with a couple of nested bash loops?\n\nYes, but it's a PITA to type this:\n\n```\n▶ while read prefix; do while read suffix; do echo $prefix$suffix; done \u003c suffixes; done \u003c prefixes\n1A\n1B\n1C\n2A\n2B\n2C\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomnomnom%2Fcomb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomnomnom%2Fcomb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomnomnom%2Fcomb/lists"}