High-performance custom implementations of standard Unix cat and grep utilities.
The project features a modular architecture with a shared common module for error handling. It supports standard POSIX flags as well as GNU long options.
# Clone the repository
git clone https://github.com/HimeNSK/c_cli_utils.git
cd c_cli_utils
# Build and test c_cat
cd src/cat && make && ./test_cat.sh
# Build and test c_grep
cd ../../src/grep && make && ./test_grep.shc_cat: 16 testsc_grep: 23 tests
.
└── src
├── cat
│ ├── Makefile
│ ├── c_cat.c # Core cat logic
│ ├── main.c # Argument parsing
│ └── test_cat.sh # Integration tests
├── common
│ ├── common.c # Shared helpers (e.g., print_error)
│ └── common.h
└── grep
├── Makefile
├── c_grep.c # Core grep logic
├── main.c # Argument parsing
└── test_grep.sh # Integration tests
Модульная архитектура с общим модулем common для обработки ошибок. Поддерживаются стандартные флаги POSIX и длинные опции GNU.
c_cat: 16 тестовc_grep: 23 теста