{"id":20031751,"url":"https://github.com/astrodynamic/greputility","last_synced_at":"2026-06-29T18:04:09.507Z","repository":{"id":161366142,"uuid":"636077249","full_name":"Astrodynamic/GrepUtility","owner":"Astrodynamic","description":"This is a grep utility project that searches for a pattern in files and outputs matching lines. It supports various flags and is built with CMake and Makefile.","archived":false,"fork":false,"pushed_at":"2023-05-04T04:46:33.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-01-12T18:09:45.566Z","etag":null,"topics":["c","cmake","grep","makefile","posix","utility"],"latest_commit_sha":null,"homepage":"","language":"C","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/Astrodynamic.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":"2023-05-04T04:43:47.000Z","updated_at":"2023-05-11T04:21:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"09e779e4-3a1c-4c77-90c8-2f921049e106","html_url":"https://github.com/Astrodynamic/GrepUtility","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FGrepUtility","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FGrepUtility/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FGrepUtility/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FGrepUtility/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Astrodynamic","download_url":"https://codeload.github.com/Astrodynamic/GrepUtility/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241462628,"owners_count":19966896,"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":["c","cmake","grep","makefile","posix","utility"],"created_at":"2024-11-13T09:34:36.504Z","updated_at":"2026-06-29T18:04:04.462Z","avatar_url":"https://github.com/Astrodynamic.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GrepUtility\n\nGrepUtility is a simple command-line utility written in C, that searches files for lines matching a regular expression pattern and prints them to the console.\n\n## Build\n\nTo build the GrepUtility, please make sure you have the following dependencies installed:\n\n- CMake 3.10 or higher\n- GCC or Clang compiler\n- PCRE or Regex libraries\n\n### Makefile Targets\n\n- `all`: build the program\n- `build`: build the program\n- `rebuild`: clean and rebuild the program\n- `install`: install the program\n- `unistall`: remove the installed program\n- `clean`: remove build and library files\n- `cppcheck`: run cppcheck on the source code\n- `clang-format`: format the source code using clang-format\n\nMakefile goals description:\n\n- `all`: it's the default target, which builds the program.\n- `build`: it's a target that builds the program.\n- `rebuild`: it's a target that cleans the previous build, builds and installs the program.\n- `install`: it's a target that installs the program in the system.\n- `unistall`: it's a target that uninstalls the program from the system.\n- `clean`: it's a target that removes all the build\n\nTo build the utility, run the following commands:\n\n```sh\nmake all\ncd build\n```\n\n## Usage\n\nTo use GrepUtility, run the following command:\n\n```sh\nGrepUtility [options] pattern [file_name]\n```\n\nHere are the available options:\n\n- `-e pattern`: Use `pattern` as the search pattern.\n- `-i`: Ignore case distinctions in both the pattern and the input files.\n- `-v`: Invert the sense of matching, to select non-matching lines.\n- `-c`: Only output the count of matching lines.\n- `-l`: Only output the names of files containing at least one matching line.\n- `-n`: Prefix each line of output with its 1-based line number within its input file.\n- `-h`: Never print filename headers (i.e. file names) with output lines.\n- `-s`: Suppress error messages about nonexistent or unreadable files.\n- `-f file`: Obtain patterns from file, one per line.\n\n## Dependencies\n\n- CMake 3.10 or higher\n- GCC or Clang compiler\n- PCRE or Regex libraries\n\n## Development\n\nThe source code, header files, and build files are located in the `model/` directory. The code follows the principles of structured programming and avoids code duplication.\n\nIntegration tests cover all flag variants and input values, based on a comparison with the behavior of real Bash utilities.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrodynamic%2Fgreputility","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrodynamic%2Fgreputility","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrodynamic%2Fgreputility/lists"}