my_mini_grep

Crates.iomy_mini_grep
lib.rsmy_mini_grep
version0.1.0
sourcesrc
created_at2024-07-29 17:34:45.569197
updated_at2024-07-29 17:34:45.569197
descriptionA mini application that aims to replicate the behavior of the grep shell command.
homepage
repository
max_upload_size
id1319053
size5,684
Bogdan Savianu (BogdanSavianu)

documentation

README

Grep Mimic Command

Overview

This project aims to replicate the behavior of the grep shell command. It searches for a specific string within a file and returns all lines that contain that string.

Features

•	Case-sensitive search by default.
•	Case-insensitive search available through an environment variable.

Usage

Command Line Arguments

The program requires two command line arguments:

1.	Search String: The string to search for within the file.
2.	File Path: The path to the file where the search will be performed.

Example

cargo run -- "search_string" file.txt

Case Insensitive Search

To perform a case-insensitive search, set the IGNORE_CASE environment variable to 1. This will make the search case insensitive for the lifetime of that terminal session.

Example

IGNORE_CASE=1 cargo run -- "search_string" file.txt

Commit count: 0

cargo fmt