[NTLUG:Discuss] Counting key presses in a file...

Fred James fredjame at fredjame.cnc.net
Mon Aug 27 15:23:57 CDT 2007


Richard Geoffrion wrote:

>I know that 'wc' can count words and lines, but how would one count.  
>While 'a' would constitute ONE keystroke, 'A' would constitute two. 
>(Shift + a).     Carriage returns would count as one while bolding text 
>would constitute four keystrokes as one would need a CTRL-B to turn 
>bolding on and another to turn bolding off.
>
>How would one go about taking an openoffice document saved in the 
>97/2000 'Word' format and converting it into something that can be 
>parsed and counted?
>  
>
Richard Geoffrion
I am not sure (haven't used MS in some time) but doesn't 'Word' have a 
built-in function for counting characters?  Would that answer you 
question, or is it more complex?

There are some simple counting programs in C, but I am not sure that is 
what you are looking for either.
Regards
Fred James




More information about the Discuss mailing list