{"id":18925590,"url":"https://github.com/nightmachinery/rmprefix","last_synced_at":"2025-07-22T22:33:46.904Z","repository":{"id":115499079,"uuid":"283878096","full_name":"NightMachinery/rmprefix","owner":"NightMachinery","description":"rmprefix can 1) remove a given prefix from the lines of input 2) replace a literal string with another.","archived":false,"fork":false,"pushed_at":"2021-03-17T14:57:54.000Z","size":14,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-25T00:18:27.010Z","etag":null,"topics":["awk","prefix","sd","sed","string","string-manipulation","string-matching"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/NightMachinery.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":"2020-07-30T21:15:09.000Z","updated_at":"2021-03-17T14:57:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"22627927-d47b-4a09-9bef-ebecc469fc3b","html_url":"https://github.com/NightMachinery/rmprefix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NightMachinery/rmprefix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightMachinery%2Frmprefix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightMachinery%2Frmprefix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightMachinery%2Frmprefix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightMachinery%2Frmprefix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NightMachinery","download_url":"https://codeload.github.com/NightMachinery/rmprefix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NightMachinery%2Frmprefix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266585998,"owners_count":23952169,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["awk","prefix","sd","sed","string","string-manipulation","string-matching"],"created_at":"2024-11-08T11:12:27.041Z","updated_at":"2025-07-22T22:33:46.877Z","avatar_url":"https://github.com/NightMachinery.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEPRECATED\n\nUse https://github.com/NightMachinary/prefixer instead. I'll continue to support bugfixes for `rmprefix`, as it's a very lightweight command and I still use it in my  scripts, but `prefixer` is better in virtually every way.\n\n# Installation\n\n```\ncargo install --git https://github.com/NightMachinary/rmprefix --force\n```\n\n# Usage\n\n`rmprefix` removes the given prefix from its input if present. The input is split using the given separator, by default newlines.\n\nUsage: `rmprefix \u003cprefix\u003e [\u003cinput-separator\u003e=\\n] [\u003coutput-separator\u003e=\\n]`\n\nSet the separators to `\\x00` for the NUL character.\n\n`rmprefix` can also work as a search and replace tool, with this neat trick:\n\n`rmprefix '' SEARCH_FOR_ME REPLACE_WITH_ME`\n\n## Examples\n\n```\necho \"The jungles are green.\nSome people sing.\nThe world is not flat.\nThere are two ways.\" | rmprefix The\n```\n \n\u003e jungles are green.\n\u003e\n\u003eSome people sing.\n\u003e\n\u003e world is not flat.\n\u003e\n\u003ere are two ways.\n\n```\necho \"123456789\" \"23456789\" \"12345\" \"Hi\" \"\" \"Ocean\" | rmprefix 123 ' ' '|||'                                             \n```\n\n\u003e 456789|||23456789|||45|||Hi||||||Ocean\n\n```\necho \"Butterflies are insects in the macrolepidopteran clade Rhopalocera from the order Lepidoptera, which also includes moths. Adult butterflies have large, often brightly coloured wings, and conspicuous, fluttering flight. The group comprises the large superfamily Papilionoidea, which contains at least one former group, the skippers (formerly the superfamily \"Hesperioidea\"), and the most recent analyses suggest it also contains the moth-butterflies (formerly the superfamily \"Hedyloidea\"). Butterfly fossils date to the Paleocene, about 56 million years ago.\" | rmprefix '' butter cheese\n```\n\n\u003e Butterflies are insects in the macrolepidopteran clade Rhopalocera from the order Lepidoptera, which also includes moths. Adult cheeseflies have large, often brightly coloured wings, and conspicuous, fluttering flight. The group comprises the large superfamily Papilionoidea, which contains at least one former group, the skippers (formerly the superfamily Hesperioidea), and the most recent analyses suggest it also contains the moth-cheeseflies (formerly the superfamily Hedyloidea). Butterfly fossils date to the Paleocene, about 56 million years ago.\n\n# Licenses\n\nDual-licensed under MIT and GPL v3 or later.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightmachinery%2Frmprefix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnightmachinery%2Frmprefix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightmachinery%2Frmprefix/lists"}