{"id":13531632,"url":"https://github.com/tomnomnom/anew","last_synced_at":"2025-04-13T01:59:45.294Z","repository":{"id":37382259,"uuid":"179059151","full_name":"tomnomnom/anew","owner":"tomnomnom","description":"A tool for adding new lines to files, skipping duplicates","archived":false,"fork":false,"pushed_at":"2024-01-12T01:06:36.000Z","size":10,"stargazers_count":1491,"open_issues_count":7,"forks_count":169,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-13T01:59:39.943Z","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":"mit","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":"LICENSE","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}},"created_at":"2019-04-02T11:01:43.000Z","updated_at":"2025-04-11T22:03:59.000Z","dependencies_parsed_at":"2022-07-08T07:39:57.596Z","dependency_job_id":"be72f63e-4c8d-42d0-99e8-6180bbf52e3f","html_url":"https://github.com/tomnomnom/anew","commit_stats":{"total_commits":12,"total_committers":5,"mean_commits":2.4,"dds":0.5,"last_synced_commit":"d67d68db0d56469fdea7505c5a9209c0a465effa"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Fanew","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Fanew/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Fanew/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Fanew/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomnomnom","download_url":"https://codeload.github.com/tomnomnom/anew/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654046,"owners_count":21140235,"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-01T07:01:04.474Z","updated_at":"2025-04-13T01:59:45.262Z","avatar_url":"https://github.com/tomnomnom.png","language":"Go","readme":"# anew\n\nAppend lines from stdin to a file, but only if they don't already appear in the file.\nOutputs new lines to `stdout` too, making it a bit like a `tee -a` that removes duplicates.\n\n## Usage Example\n\nHere, a file called `things.txt` contains a list of numbers. `newthings.txt` contains a second\nlist of numbers, some of which appear in `things.txt` and some of which do not. `anew` is used\nto append the latter to `things.txt`.\n\n\n```\n▶ cat things.txt\nZero\nOne\nTwo\n\n▶ cat newthings.txt\nOne\nTwo\nThree\nFour\n\n▶ cat newthings.txt | anew things.txt\nThree\nFour\n\n▶ cat things.txt\nZero\nOne\nTwo\nThree\nFour\n\n```\n\nNote that the new lines added to `things.txt` are also sent to `stdout`, this allows for them to\nbe redirected to another file:\n\n```\n▶ cat newthings.txt | anew things.txt \u003e added-lines.txt\n▶ cat added-lines.txt\nThree\nFour\n```\n\n## Flags\n\n- To view the output in stdout, but not append to the file, use the dry-run option `-d`.\n- To append to the file, but not print anything to stdout, use quiet mode `-q`.\n\n## Install\n\nYou can either install using go:\n\n```\ngo install -v github.com/tomnomnom/anew@latest\n```\n\nOr download a [binary release](https://github.com/tomnomnom/anew/releases) for your platform.\n","funding_links":[],"categories":["Other","Go","Miscellaneous","Weapons","Wordlist tools","\u003ca name=\"text-processing\"\u003e\u003c/a\u003eText processing","开发工具\u0026框架"],"sub_categories":["Useful","Tools","Generation/Manipulation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomnomnom%2Fanew","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomnomnom%2Fanew","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomnomnom%2Fanew/lists"}