1 unstable release

0.1.0 Jul 12, 2024

#2627 in Command line utilities

MIT license

9KB
53 lines

fe-cli

fe-cli is a simple command-line application written in Rust that mimics the basic functionality of the grep command. It allows you to search for a specified pattern within a file and outputs the lines containing that pattern.

Features

  • Search for a pattern in a file
  • Display lines containing the pattern

Installation

To install fe-cli, you need to have Rust and Cargo installed. If you don't have Rust installed, you can install it from here.

Clone the repository and build the application using Cargo:

git clone https://github.com/vishalg0wda/fe-cli.git
cd fe-cli
cargo build --release

The executable will be available in the target/release directory.

Usage

Run the fe-cli command followed by the pattern you want to search for and the file you want to search in:

./target/release/fe-cli <PATTERN> <FILE>

For example:

./target/release/fe-cli foo example.txt

This command will search for the pattern foo in the file example.txt and print each line that contains the pattern.

Example

Consider the following content in example.txt:

foo bar
baz qux
foo baz
qux foo

Running the command:

./target/release/fe-cli foo example.txt

Will output:

foo bar
foo baz
qux foo

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes. Ensure that you follow the Rust coding standards and write tests for your code.

License

This project is licensed under the MIT.

Acknowledgements

This project is based on the Rust tutorial crate titled "grrs". Special thanks to the Rust community for their excellent documentation and tutorials.

Dependencies

~3–11MB
~111K SLoC