Shawn Koons wrote:
>
> Hello:
>
> Forgive this possible faq, but is there a way to do a word count in lyx
> (I have checked the documentation and found nothing) - or - should I
> convert to ascii and check it that way?
>
> Shawn
> --
> Mitakuye Oyasin
Well, here's a perl script that should do something close (this defines
a "word"
as a group of letters and/or apostrophes or dashes). Uncomment the
"print" line
to see if it leaves the words you want.
#!/usr/bin/perl -w
# Count words in a lyx file
my $total = 0;
while (<>)
{
chomp;
next if ($. == 1) || m'^\\' || m'^$';
tr/-a-zA-Z' / /cds;
tr/'//;
# print "$_\n"; # uncomment to see it operating
$total += split;
}
print "$total\n";
--
Ned Konz
currently: Stanwood, WA
email: [EMAIL PROTECTED]
homepage: http://www.bike-nomad.com