GithubHelp home page GithubHelp logo

mygrep's Introduction

Prerequisites

Before running MyGrep, make sure you have the following tools installed on your system:

  1. Rust:

    • MyGrep is a Rust project, and you need the Rust programming language installed. You can install Rust by following the instructions on the official Rust website.
  2. Cargo:

    • Cargo is the official package manager and build tool for Rust. It is usually included with the Rust installation.

Usage

To use MyGrep, follow these steps:

  1. Clone the repository:

    git clone https://github.com/yourusername/mygrep.git
  2. Navigate to the project directory:

    cd mygrep
  3. Build the project:

    cargo build --release
  4. Run MyGrep with the desired query and file path:

    ./target/release/mygrep query file_path

    You can also set the IGNORE_CASE environment variable to perform a case-insensitive search:

    IGNORE_CASE=1 ./target/release/mygrep query file_path

Example

Suppose you have a file named example.txt with the following content:

Rust:
safe, fast, productive.
Pick three.
Duct tape.

To search for the query "duct" in a case-sensitive manner, run the following command:

./target/release/mygrep duct example.txt

To perform a case-insensitive search, set the IGNORE_CASE environment variable:

IGNORE_CASE=1 ./target/release/mygrep duct example.txt

This will output:

Duct tape.

mygrep's People

Contributors

guizo792 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.