bug-grep
[Top][All Lists]
Advanced

[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)

URL:
  <http://savannah.gnu.org/patch/?6111>

                 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

    _______________________________________________________

Details:

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
 gnome'

(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

Thanks,
Serafeim



    _______________________________________________________

File Attachments:


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

<http://savannah.gnu.org/patch/download.php?file_id=13440>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?6111>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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