view src/srch @ 349:836b65dec53b

- updated the "srch" script for the new in-tree dw2.
author jcid
date Wed, 24 Sep 2008 21:02:34 +0200
parents 6ee11bf9e3ea
children
line wrap: on
line source
#!/bin/sh
#
# Find a token within source files ( *.[ch] )
# Enjoy!
# Jorge.-

if [ $# = 1 ]; then
  FLAGS="-H"
elif [ $# = 2 ]; then
  FLAGS="-H $1"
  shift 1
else
  echo "Usage:"
  echo "   srch [-options] <token>"
  exit 0
fi

#  find "./" -name "*.[ch]" -print -exec grep $1 {} \;
egrep $FLAGS "$1" *.[ch][ch]
egrep $FLAGS "$1" *.[ch]
egrep $FLAGS "$1" IO/*.[ch][ch]*
egrep $FLAGS "$1" IO/*.[ch]
egrep $FLAGS "$1" ../dpi/*.[ch]
egrep $FLAGS "$1" ../dpi/*.[ch][ch]
egrep $FLAGS "$1" ../dpid/*.[ch]
egrep $FLAGS "$1" ../dpip/*.[ch]
egrep $FLAGS "$1" ../dlib/*.[ch]

#egrep $FLAGS "$1" dw/*[ch]
#egrep $FLAGS "$1" lout/*[ch]
egrep $FLAGS "$1" ../dw/*[ch]
egrep $FLAGS "$1" ../lout/*[ch]