Thanks to visit codestin.com
Credit goes to lib.rs

2 releases

Uses new Rust 2024

0.1.34 Aug 20, 2025
0.1.32 Aug 13, 2025

#40 in #cat

Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App

51 downloads per month
Used in younix

Apache-2.0

5KB

Younix grep Command

The grep command in Younix searches for lines in a file that match a specified pattern, similar to the Unix grep utility. It supports case-insensitive searches and inverted matching.

Usage

younix grep [OPTIONS] --pattern <PATTERN> <FILE>

Options

Option Description
-p, --pattern <PATTERN> The pattern to search for
-c, --case-insensitive Match the pattern case-insensitively
-i, --invert Show lines that don't match the pattern
-n, --number Show line numbers in the output
-h, --help Print help information

Arguments

Argument Description
<FILE> File to search

Examples

  • Search for "error" in logs.txt:

    younix grep --pattern error logs.txt
    
  • Case-insensitive search with line numbers:

    younix grep --pattern error logs.txt -c -n
    
  • Show lines that don't match "error":

    younix grep --pattern error logs.txt -i
    

Dependencies

~1.7–6.5MB
~141K SLoC