{"id":24108244,"url":"https://github.com/mk-milly02/go-sed","last_synced_at":"2026-06-10T12:31:55.993Z","repository":{"id":271366247,"uuid":"913203382","full_name":"mk-milly02/go-sed","owner":"mk-milly02","description":"go-sed is a simple and efficient command-line tool written in Go for performing basic text transformations, similar to the Unix sed command.","archived":false,"fork":false,"pushed_at":"2025-01-07T08:38:22.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T09:53:38.776Z","etag":null,"topics":["filesystem","golang","sed","unix"],"latest_commit_sha":null,"homepage":"https://codingchallenges.fyi/challenges/challenge-sed","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/mk-milly02.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-07T08:26:41.000Z","updated_at":"2025-01-11T06:58:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"1ecebcaa-ddc9-4093-a61f-2d9c3147f4b0","html_url":"https://github.com/mk-milly02/go-sed","commit_stats":null,"previous_names":["mk-milly02/go-sed"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mk-milly02/go-sed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mk-milly02%2Fgo-sed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mk-milly02%2Fgo-sed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mk-milly02%2Fgo-sed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mk-milly02%2Fgo-sed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mk-milly02","download_url":"https://codeload.github.com/mk-milly02/go-sed/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mk-milly02%2Fgo-sed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34153482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"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":["filesystem","golang","sed","unix"],"created_at":"2025-01-10T23:26:40.001Z","updated_at":"2026-06-10T12:31:55.988Z","avatar_url":"https://github.com/mk-milly02.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-sed\n\n`go-sed` is a simple and efficient command-line tool written in Go for performing basic text transformations, similar to the Unix `sed` command.\n\n## Features\n\n- Search and replace text in files\n- In-place file editing\n- Addition of double spacing\n- Removal of trailing blank lines\n- Suppress automatic printing of pattern space\n\n## Usage\n\nBasic usage of `go-sed`:\n\n```sh\n$ go run main.go -h\nUsage of: go run main.go [options] [script] [filename]\nOptions:\n    -i string\n        edit in-place (default \"s/The/Code/g\")\n    -n string\n        only output a range of lines from the file (default \"1p\")\nScript:\n    - s/this/that/g\n    - G\n    - /^$/d\nFilename:\n    quotes.txt\n```\n\n```sh\ngo run main.go 's/old/new/g' input.txt\n```\n\n- `s/old/new/g`: Substitute `old` with `new` globally in the file\n\n```sh\ngo run main.go -n '2,4p' input.txt\n```\n\n- `-n '2,4p'`: Only output a range of lines from the file i.e line 2 to line 4\n\n```sh\ngo run main.go -n /code/p input.txt\n```\n\n- `-n /code/p`: Output only lines containing a specific pattern `code`\n\n```sh\ngo run main.go G input.txt\n```\n\n- `G`: Support double spacing a file\n\n```sh\ngo run main.go /^$/d input.txt\n```\n\n- `/^$/d`: Strip trailing blank lines from a file\n\n```sh\ngo run main.go -i 's/Life/Code/g' intput.txt\n```\n\n- `-i 's/Life/Code/g'`: Edit in place\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request on GitHub.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmk-milly02%2Fgo-sed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmk-milly02%2Fgo-sed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmk-milly02%2Fgo-sed/lists"}