clxrity_lilgrep 0.1.0

A simple grep-like utility written in Rust.
Documentation
  • Coverage
  • 0%
    0 out of 9 items documented0 out of 5 items with examples
  • Size
  • Source code size: 6.1 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.3 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • clxrityy

lilgrep

A miniature version of the grep command line tool built with Rust.

Search for a specific word within a file, and the entire line(s) containing that word will be returned to you.

Requirements:
  • Must have Rust installed on your OS
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Basic usage

  • Search for the word what within the file poem.txt:
cargo run what poem.txt

Case sensitivity

By default, the search is case sensitive.

If "What" exists but not the search query "what", nothing will be returned.

This is dependant upon this environment variable:
CASE_INSENSITIVE=
  • To change this, all you need to do is run:
export CASE_INSENSITIVE=true
  • To remove:
unset CASE_INSENSITIVE

Directing the output to a file

  • Search for every case of "what" within poem.txt, and direct the result to output.txt
cargo run what poem.txt > output.txt