DEV Community

Thiago Massari Guedes
Thiago Massari Guedes

Posted on

sgrep 1.0 released

Have you ever wanted to see the top line when running:

❯ ps -ef | grep bash
  501 56821 56820   0 17Nov24 ttys000    0:00.27 /opt/homebrew/bin/bash -l
  501 95638 56821   0  8:19pm ttys000    0:00.00 grep bash
  501 76214 56820   0 Mon09am ttys002    0:00.44 /opt/homebrew/bin/bash -l
  501 82952 56820   0  7:03pm ttys003    0:00.23 /opt/homebrew/bin/bash -l
Enter fullscreen mode Exit fullscreen mode

You can with sgrep

❯ ps -ef | sgrep -t 1 -p bash
0:   UID   PID  PPID   C STIME   TTY           TIME CMD
642:   501 56821 56820   0 17Nov24 ttys000    0:00.27 /opt/homebrew/bin/bash -l
644:   501 95648 56821   0  8:19pm ttys000    0:00.00 sgrep -t 1 -p bash
645:   501 76214 56820   0 Mon09am ttys002    0:00.44 /opt/homebrew/bin/bash -l
646:   501 82952 56820   0  7:03pm ttys003    0:00.23 /opt/homebrew/bin/bash -l
Enter fullscreen mode Exit fullscreen mode

The main idea of sgrep is to have simple command line options, simple to use.

Installing

Using brew:

brew tap thiagomg/texted
brew install thiagomg/texted/simplegrep
Enter fullscreen mode Exit fullscreen mode

Or using cargo

cargo install sgrep
Enter fullscreen mode Exit fullscreen mode

Top comments (0)