[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Hi,
Hi!
Well the following script may be useful in locating a token! Use it as ./finder directory pattern
eg. ./finder tcl/lib phymib
it will give you the filename and the line numbers in the file where one gets the pattern! You can refine it to search subdirectories also!
Enjoy pattern hunting!
Regards,
dhiraj
#file finder
#!/usr/sh
clear
for name in `ls $1`
do
file=$1/$name
echo "----------------------------------"
if cat -n $file |grep $2
then
echo "PATTERN FOUND IN FILE : " $file
echo "-------------------------------"
fi
done
_____________________________________________________
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com