CSearch is a lightweight command-line utility built with C, offering basic grep-like functionality with a focus on simplicity and efficiency. The tool allows users to search for keywords within files, providing highlighted text results for enhanced readability.
- Keyword Search: Locate words or phrases within files.
- File Highlighting: Highlighted text results for easy identification.
- Efficient Codebase: Built in C for optimal performance and minimal resource usage.
- GNU/Linux system
- GCC compiler
- Clone the repository:
git clone https://github.com/your-username/csearch.git
- Compile the source code:
cd csearch
gcc -o csearch main.c
-f
, --file
FILE: Specify the filename from which you want to search.
-w
, --word
WORD: Specify the word you want to search.
-h
, --help
: Display help about the flags and usage.
-v
, --version
: Display the version of the tool currently installed.
Search for the word "example" in the file "sample.txt":
csearch -f sample.txt -w example
You can see all the options using -h
or --help
.
csearch -h
This is a word search utility for the command line, similar to grep/fstring tool.
-f, --file FILE | Put the filename from which you want to search
-w, --word WORD | Word which you want to search
-h, --help HELP | Use this flag to get help about the flags and usage
-v, --version VERSION | Use this flag to print the version of the tool currently installed
Example: search -f <filename> -w <word>
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.
This project is licensed under the MIT License.