{"id":16646639,"url":"https://github.com/alexdelorenzo/nth_rs","last_synced_at":"2025-07-02T20:09:04.574Z","repository":{"id":57646776,"uuid":"291799938","full_name":"alexdelorenzo/nth_rs","owner":"alexdelorenzo","description":"Return or exclude the nth item via stdin","archived":false,"fork":false,"pushed_at":"2020-09-25T07:02:08.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-25T02:32:52.407Z","etag":null,"topics":["coreutils","stdin","stdout","unix-command","utility"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexdelorenzo.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}},"created_at":"2020-08-31T18:58:46.000Z","updated_at":"2020-09-25T07:02:11.000Z","dependencies_parsed_at":"2022-09-19T04:30:18.875Z","dependency_job_id":null,"html_url":"https://github.com/alexdelorenzo/nth_rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alexdelorenzo/nth_rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdelorenzo%2Fnth_rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdelorenzo%2Fnth_rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdelorenzo%2Fnth_rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdelorenzo%2Fnth_rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexdelorenzo","download_url":"https://codeload.github.com/alexdelorenzo/nth_rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdelorenzo%2Fnth_rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263208051,"owners_count":23430676,"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":["coreutils","stdin","stdout","unix-command","utility"],"created_at":"2024-10-12T08:42:42.472Z","updated_at":"2025-07-02T20:09:04.554Z","avatar_url":"https://github.com/alexdelorenzo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nth_rs\nReturn or exclude the `nth` lines supplied from stdin as output on stdout. See the Python version of this utility here: [nth_py](https://github.com/alexdelorenzo/nth_py).\n\nThis project utilizes [`byte_lines`](https://github.com/alexdelorenzo/byte_lines) to iterate over standard input as lines of bytes, instead of strings or individual bytes.\n\n# Install\n\n```bash\ncargo install nth_rs\n```\n\n# Usage\n\n```bash\n$ dmesg | nth_rs 0 1 2 3\n[    4.095065] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller\n[    4.100328] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 4\n[    4.107985] xhci-hcd xhci-hcd.3.auto: Host supports USB 3.0  SuperSpeed\n[    4.109677] mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 52000000Hz, actual 50000000HZ div = 0)\n\n```\n\nTo better illustrate, let's enumerate each line of stdin:\n\n```bash\n$ dmesg | count | nth_rs 0 1 2 3\n     0  [    4.095065] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller\n     1  [    4.100328] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 4\n     2  [    4.107985] xhci-hcd xhci-hcd.3.auto: Host supports USB 3.0  SuperSpeed\n     3  [    4.109677] mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 52000000Hz, actual 50000000HZ div = 0)\n```\n\n## Help\n```bash\n$ nth_rs --help\nnth 0.2.0\nAlexDeLorenzo.dev\nReturn the contents of stdin from the line numbers supplied as arguments.\n\nUSAGE:\n    nth_rs [FLAGS] \u003cLINES\u003e...\n\nFLAGS:\n    -h, --help       Prints help information\n    -r, --reverse    Write every line, except the line numbers supplied as LINES, from stdin to stdout.\n    -V, --version    Prints version information\n\nARGS:\n    \u003cLINES\u003e...    Line numbers to select\n\n```\n\n# License\nSee `LICENSE`. If you'd like to use this project with a different license, please get in touch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdelorenzo%2Fnth_rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexdelorenzo%2Fnth_rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdelorenzo%2Fnth_rs/lists"}