Quicker than grep?

From: Yiannis Kanellopoulos (yiannis.kanellopoulos@nl.wanadoo.com)
Date: Thu Dec 08 2005 - 08:02:26 EST


Hello managers,
I need to do quick and plenty of ldapsearches everyday.
If I use the ldapsearch, I actually increase the load on the system by a
lot, and network traffic and so on.
So everynihgt i export the ldif, and have a quick bourne shell script to
grep for the values i look for in the ldif.
the problem is that the ldif now is getting bigger and bigger, and more
people start to use the script (its much quicker than the ldapsearch,
less accurate though) so actually my system start being really slow.

Is there a way (without implementing a Fire880) to do this quicker?
the grep? this is pretty much what I do in the script.
Now it takes about 1, to 2 mins for EACH search!
any ideas?
Will summarize of course.
Thanx,
y.
#----
#SCRIPT:
#-----
DATABASE=/var/import/helpdeskreport.txt.out

# do we have a string to search for ?
if [ $1 ]
then
 grep $* $DATABASE |\
  sed 's/\<td\>/%%/g' |\
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:37:35 EDT