#grep #command-line #utils #lazy-evaluation #pub #struct #remember

app sgrep

A simple grep util for those lazy to remember many command line options

6 releases (stable)

1.0.5 Dec 2, 2024
1.0.3 Nov 27, 2024
0.2.0 Nov 27, 2024
0.1.0 Jun 26, 2024

#287 in Text processing

Download history 11/week @ 2024-09-11 7/week @ 2024-09-18 13/week @ 2024-09-25 15/week @ 2024-10-02 2/week @ 2024-10-09 567/week @ 2024-11-27 90/week @ 2024-12-04 7/week @ 2024-12-11 7/week @ 2024-12-25

133 downloads per month

Apache-2.0

12KB
262 lines

Simple Grep (sgrep)

A simple grep util for those lazy to remember many command line options

Usage

# Displays lines containing "pub struct" string in all .rs files in the local directory
sgrep -p "pub struct" *.rs

# Displays lines containing "#ifdef" or "#ifndef" in all *.c* and *.h* files
sgrep -p "#ifdef" -p "#ifndef" -f .c -f .h

# Display the top 1 line and filter for bash, case insensitive
ps -ef | sgrep -t 1 -i -p bash

Installing

Using brew:

brew tap thiagomg/texted
brew install thiagomg/texted/simplegrep

Or using cargo

cargo install sgrep

Dependencies

~1.3–8MB
~69K SLoC