{"id":20031757,"url":"https://github.com/astrodynamic/catutility","last_synced_at":"2026-06-02T20:31:21.200Z","repository":{"id":161346335,"uuid":"635832620","full_name":"Astrodynamic/CatUtility","owner":"Astrodynamic","description":"This is a cat utility implementation in C supporting all flags specified in the project requirements, with a Makefile for easy building.","archived":false,"fork":false,"pushed_at":"2023-05-04T04:17:00.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-02T05:27:47.076Z","etag":null,"topics":["c","cat","cmake","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-03T14:47:37.000Z","updated_at":"2023-05-11T04:21:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"e8c582d1-a3a7-4e7a-a65c-3d94f144fde9","html_url":"https://github.com/Astrodynamic/CatUtility","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Astrodynamic/CatUtility","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FCatUtility","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FCatUtility/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FCatUtility/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FCatUtility/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Astrodynamic","download_url":"https://codeload.github.com/Astrodynamic/CatUtility/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FCatUtility/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33835765,"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-02T02:00:07.132Z","response_time":109,"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":["c","cat","cmake","makefile","posix","utility"],"created_at":"2024-11-13T09:34:37.250Z","updated_at":"2026-06-02T20:31:21.182Z","avatar_url":"https://github.com/Astrodynamic.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cat Utility in C\n\nThis project is an implementation of the `cat` utility in C, based on the C11 standard and compiled with gcc, following the POSIX.1-2017 standard. The `cat` utility is used to display, combine, and create text files. This implementation supports all flags specified in the project requirements, including the GNU versions.\n\n## Build\n\nTo build the `cat` utility, you can use the Makefile provided in the `build/` directory. The Makefile includes the following targets:\n\n- `all`: Builds the program.\n- `build`: Installs the program.\n- `rebuild`: Cleans the build directory and installs the program.\n- `install`: Creates the build directory and compiles the program in it.\n- `uninstall`: Removes the build directory.\n- `clean`: Removes the build directory and all object files.\n\nTo build the program, run:\n\n```\nmake all\n```\n\nThis will create an executable file named `CatenateUtility` in the `build/` directory.\n\n## Usage\n\nThe `cat` utility takes one or more file names as arguments. It reads each file in sequence and writes its contents to the standard output. If no files are specified, it reads from the standard input.\n\nThe following flags are supported:\n\n- `-b` (`--number-nonblank`): Numbers only non-empty lines.\n- `-e` (implies `-v`, GNU only: `-E` the same, but without implying `-v`): Displays end-of-line characters as `$`.\n- `-n` (`--number`): Numbers all output lines.\n- `-s` (`--squeeze-blank`): Squeezes multiple adjacent blank lines.\n- `-t` (implies `-v`, GNU: `-T` the same, but without implying `-v`): Displays tabs as `^I`.\n\nFor example, to display the contents of a file named `example.txt` and number all output lines, run:\n\n```\n./CatenateUtility -n example.txt\n```\n\nTo display the contents of multiple files and display end-of-line characters as `$`, run:\n\n```\n./CatenateUtility -e file1.txt file2.txt file3.txt\n```\n\n## Dependencies\n\nThis implementation does not use any third-party libraries. It only uses the standard C libraries and follows the POSIX.1-2017 standard.\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` file for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrodynamic%2Fcatutility","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrodynamic%2Fcatutility","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrodynamic%2Fcatutility/lists"}