Seeking a grep-like script

Ahmed Kamal email.ahmedkamal at googlemail.com
Thu Jun 10 12:27:24 UTC 2010


Google says

#!/bin/sh

# usage: pargrep

inFile="$1"
searchString="$2"

awk '
BEGIN {
FS="\n"
RS=""
}
/'"$searchString"'/ { print }
' ${inFile}

On Thu, Jun 10, 2010 at 3:15 PM, Timothy Murphy <gayleard at eircom.net> wrote:

> I'm looking for a grep-like script that searches for a given word,
> and returns the _paragraphs_ in which it appears (rather than the lines),
> where a paragraph is defined as the material between 2 blank lines.
>
> All suggestions gratefully received.
>
> --
> Timothy Murphy
> e-mail: gayleard /at/ eircom.net
> tel: +353-86-2336090, +353-1-2842366
> s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
>
> _______________________________________________
> kde mailing list
> kde at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/kde
> New to KDE4? - get help from http://userbase.kde.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/kde/attachments/20100610/69b6e25b/attachment.html 


More information about the kde mailing list