Re: [dev] [grep-notify] A simple notifier when stdout prints a pattern

From: Markus Teich <>
Date: Sat, 28 Jun 2014 22:45:18 +0200

Amadeus Folego wrote:
> Since I could not find one, I've started grep-notify[3].
> If you guys have any idea or know of another program that could help me
> with this, it would be great!

Heyho Amadeus,

0. Your dependencies are screwed up, you link against gdk_pixbuf-2.0, gio-2.0,
gobject-2.0 and glib-2.0. Why do you need libnotify, if you can just notify the
user via printing the bell character? Why do you need pcre instead of standard
library POSIX regexes (see regex.h)?

1. There is no errorhandling/usage() for argc<2

2. man getline
If *lineptr is set to NULL and *n is set 0 before the call, then getline() will
allocate a buffer for storing the line. This buffer should be freed by the
user program even if getline() failed.

3. you should not introduce a function (line_match) just to call another
function (pcre_exec).

Received on Sat Jun 28 2014 - 22:45:18 CEST

This archive was generated by hypermail 2.3.0 : Sat Jun 28 2014 - 22:48:06 CEST