Hi,
I don't understand exactly what you wanna do
But I think a bash script can do the trick with commands like "wc" (to count the number of lines, words, char... in a file), "grep" (to catch a pattern in a file) and the redirection operators (>,<,|)
Oliv'