Hi all,

Does Lyx have a WordCount function? If not, this appears to work:

grep -v "^[\]" z.lyx | grep -v "^#LyX 1.1" | grep -v "^$"  | wc -w

In the preceding z.lyx is the file whose words you're counting. Basically, 
you blow off anything starting with a backslash (putting a backslash in your 
content results in a \backslash line, not in your content line starting with 
a backslash). The next grep blows off the first line, and the third grep 
blows off blank lines. You pipe the result into wc, counting only words.

Do any of you have better ways of counting words?

Thanks

Steve

-- 
Steve Litt
Webmaster, Troubleshooters.Com
http://www.troubleshooters.com
[EMAIL PROTECTED]
(Legal Disclaimer) Follow these suggestions at your own risk.




Reply via email to