view src/srch @ 2102:e1973d1962c5

rm comment warning about (left|right)-tab
author corvid <corvid@lavabit.com>
date Tue, 21 Jun 2011 00:15:55 +0000
parents 836b65dec53b
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]