|
|
Word Counter - Count words and characters in text
Or just...
Word Counter - Count words and characters in text
We have hints on wc. But wc doesn't work well on .doc files, at least in my experience. For instance, consider my Chapter 14.doc file...
So explain to me what I'm doing wrong? -rob.
Word Counter - Count words and characters in text
You can use the
textutil CLI program along with wc to get an accurate wordcount. Here's the command:
To break it down, we're telling Now then, if you have multiple files, you can combine them on the fly and produce a collective word count thusly:
The new flag By the way, the commands above leave the original documents untouched.
Word Counter - Count words and characters in text
I appreciate the CLI solution ... but in this case, I think I'm going to have to say the GUI is somewhat easier and quicker for me -- especially since a given folder may hold much more than just the files I wish to count. So it's a quick drag-n-drop and that's it ... nice to know, though, that I can do this via SSH if the need arises!
using textedit or antiword to convert .doc to ascii
another thing to try is 'antiword'. it's a Free program which will convert word files to ascii text (even the tables usually come out decent). it would be interesting to compare antiword to textedit's output.
Word Counter - Count words and characters in text
When I ran wc -wc *.doc on the whole book, it told me that there were 4.3million characters in the files. Word Counter returns a much more accurate figure of just under 1.0million. So explain to me what I'm doing wrong?Probably nothing. Word generates a heap of text in the files that aren't displayed. Do you use the versioning facility, or track changes? They tend to make the filesizes huge. Also, if you open the docs up in a text editor, you'll probably find lots of extra stuff (like your address etc. all stored in there too!)
Word Counter - Count words and characters in text
.doc files are most assuredly not ascii, which is what wc is assuming.
Word Counter - Count words and characters in text
Rather than pasting, after copying the text you can just do 'pbpaste | wc -w' |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|