{"id":21489929,"url":"https://github.com/youssef-shehata/a-rusty-grip","last_synced_at":"2026-05-22T14:16:01.970Z","repository":{"id":252529510,"uuid":"840711045","full_name":"Youssef-Shehata/a-rusty-grip","owner":"Youssef-Shehata","description":"creating the famous cli tool grep from scratch in rust ","archived":false,"fork":false,"pushed_at":"2024-12-24T14:06:21.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T20:32:35.403Z","etag":null,"topics":["rust","shell"],"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/Youssef-Shehata.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":"2024-08-10T13:00:38.000Z","updated_at":"2024-12-24T14:03:35.000Z","dependencies_parsed_at":"2024-08-10T14:23:24.249Z","dependency_job_id":"a174ebfa-0e10-42f7-bce3-2d052c769c20","html_url":"https://github.com/Youssef-Shehata/a-rusty-grip","commit_stats":null,"previous_names":["youssef-shehata/a-rusty-grip"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Youssef-Shehata%2Fa-rusty-grip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Youssef-Shehata%2Fa-rusty-grip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Youssef-Shehata%2Fa-rusty-grip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Youssef-Shehata%2Fa-rusty-grip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Youssef-Shehata","download_url":"https://codeload.github.com/Youssef-Shehata/a-rusty-grip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244022711,"owners_count":20385134,"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":["rust","shell"],"created_at":"2024-11-23T14:29:16.351Z","updated_at":"2026-05-22T14:16:01.900Z","avatar_url":"https://github.com/Youssef-Shehata.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grep CLI Tool In Rust\n\n## Table of Contents\n\n1. [Introduction](#introduction)\n2. [Installation](#installation)\n3. [Basic Usage](#basic-usage)\n4. [Soon](#Soon)\n\n## Introduction\n\nTrying to write the famous `grep` command in Rust , implementing almost the same functionality as the original `grep` command from scratch without using any regular expressions , and writing my very own string parsing logic.\n\nso far you can search a string or multiple files using the following patterns and it returns wether it matches or not :\n\n- `.` to match any character except a newline\n- `[abc]` to match any character in the set abc\n- `[^abc]` to match any character not in the set abc\n- `\\w` to match a word character (alphanumeric plus \\_)\n- `\\d` to match a digit\n- `(w$)|(^[^w])` to match either pattern\n- `?` to match zero or one occurrence of the preceding character\n- `+` to match one or more occurrences of the preceding character\n\nand you can use these options to control your results :\nPattern selection and interpretation:\n\n- `-i`, `--ignore-case` ignore case distinctions in patterns and data\n- `-v`, `--invert-match` select non-matching lines\n- `-h`, `--help` display this help text and exit\n\nOutput control:\n\n- `-n`, `--line-number` print line number with output lines\n- `-c`,`--count` print only a count of selected lines per FILE\n\n## Installation\n\nClone this repository and you will find a small script called `grep.sh` that builds and runs the project for you .\nor you can build it manually by running the following commands:\n\n```sh\ncargo build --release\n```\n\n## Basic Usage\n\ngrep [OPTION]... PATTERNS [FILE]...\nSearch for PATTERNS in each FILE.\n\n```sh\n    ./grep -i 'hello world' menu.h main.c\n```\n\nor\n\n```sh\n    cat main.c | ./grep -i 'hello world'\n```\n\n## Soon\n\n- `-E` to match extended regular expressions\n- `-F` to match fixed strings\n- `-m` stop after a certain number of lines\n- `-L` to only print names of the files with 0 matches\n- `-l` to only print names of the files with any matches\n- `^` to match the beginning of a line\n- `$` to match the end of a line\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoussef-shehata%2Fa-rusty-grip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoussef-shehata%2Fa-rusty-grip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoussef-shehata%2Fa-rusty-grip/lists"}