jed-users mailing list

[2009 Date Index] [2009 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

tip: better grepping with fpg


I do all my editing with jed, also my programming. I am an addicted CLI
user and hate bloatware IDEs. I often use (r)grep to search in my source
files, eg: rgrep -h $PATTERN *

But in this case rgrep also looks in the backup~ files, which gives too
much unneccessary output and (r)grep has no exclusion option "do not look
in files with ~ at end of filename or starting with #".

Second, I get confused by different regex sets from perl, *grep, jed, awk,
sed etc.

Therefore I have programmed my own grep in perl: fpg

With fpg backup files are excluded by default, Example:

fex@fex:~/fexdev/cgi-bin: fpg open.*akey *
fpg: ignoring foc~ fop~ fuc~ fup~ fur~ mua~ rup~ sex~ wua~ xxx~

foc:
    if (open $akey,"$akeydir/$ra:$akey/@" and $id = <$akey>) {

fuc:
    if (open $akey,"$akeydir/$ra:$akey/@" and $id = <$akey>) {

fup:
    if (open $idf,"$akeydir/$ra:$akey/@" and $id = <$idf>) {

rup:
    if (open $akey,"$akeydir/$ra:$akey/@" and $id = <$akey>) {



You can find fpg on: http://fex.rus.uni-stuttgart.de/fstools/


-- 
Ullrich Horlacher              Server- und Arbeitsplatzsysteme
Rechenzentrum                  E-Mail: horlacher@xxxxxxxxxxxxxxxxxxxx
Universitaet Stuttgart         Tel:    ++49-711-685-65868
Allmandring 30                 Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.rus.uni-stuttgart.de/

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2009 date index] [2009 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]