annotate src/srch @ 0:6ee11bf9e3ea

Initial revision
author jcid
date Sun, 07 Oct 2007 00:36:34 +0200
parents
children 836b65dec53b
rev   line source
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
1 #!/bin/sh
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
2 #
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
3 # Find a token within source files ( *.[ch] )
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
4 # Enjoy!
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
5 # Jorge.-
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
6
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
7 if [ $# = 1 ]; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
8 FLAGS="-H"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
9 elif [ $# = 2 ]; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
10 FLAGS="-H $1"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
11 shift 1
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
12 else
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
13 echo "Usage:"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
14 echo " srch [-options] <token>"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
15 exit 0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
16 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
17
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
18 # find "./" -name "*.[ch]" -print -exec grep $1 {} \;
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
19 egrep $FLAGS "$1" *.[ch][ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
20 egrep $FLAGS "$1" *.[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
21 egrep $FLAGS "$1" IO/*.[ch][ch]*
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
22 egrep $FLAGS "$1" IO/*.[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
23 egrep $FLAGS "$1" ../dpi/*.[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
24 egrep $FLAGS "$1" ../dpi/*.[ch][ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
25 egrep $FLAGS "$1" ../dpid/*.[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
26 egrep $FLAGS "$1" ../dpip/*.[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
27 egrep $FLAGS "$1" ../dlib/*.[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
28
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
29 #egrep $FLAGS "$1" dw/*[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
30 #egrep $FLAGS "$1" lout/*[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
31 egrep $FLAGS "$1" ../../dw-testbed/dw/*[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
32 egrep $FLAGS "$1" ../../dw-testbed/lout/*[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
33