[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #6111] Shell script that produces a pipeline of greps

From: anonymous
Subject: [patch #6111] Shell script that produces a pipeline of greps
Date: Mon, 23 Jul 2007 13:06:44 +0000
User-agent: Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.6 (like Gecko) (Kubuntu)


                 Summary: Shell script that produces a pipeline of greps
                 Project: grep
            Submitted by: None
            Submitted on: Monday 07/23/2007 at 13:06 UTC
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any



I've written a shell script, pgrep, that accepts combinations of patterns
(using logical and/or/not operators) and produces the relevant pipeline of
greps. To exemplify,

$ apt-cache search view | pgrep image,picture -gtk,gnome

will expand to

$ apt-cache search view | grep 'image
 picture' | grep -v 'gtk

(in pgrep, comma stands for logical or, minus for logical not, and everything
else is and'ed)

The script is fairly trivial but does save a lot of typing. If there's
enought interest, I could spend some time to improve it (eg, allow the user
to pass switches to the pipeline's greps).

ps. pgrep is actually the name of another utility, feel free to suggest
another name



File Attachments:

Date: Monday 07/23/2007 at 13:06 UTC  Name: pgrep  Size: 978B   By: None



Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]