June 2007
Intermediate to advanced
294 pages
8h 6m
English
It’s often handy to know the number of words in a file. Word count is a standard feature in word-processing programs, but if you’re not using a word processor, obtaining a word count might not be so easy. I originally wrote this script when I was working on a project using an XML-based document production system called DocBook (http://www.docbook.org) and wanted to have a word count that roughly corresponded to those you could get from a word processor. The Unix command wc counts words, but the numbers it reported didn’t necessarily match what a word processor might report; the main reason probably had to do with issues like whether words with fewer than a certain number of letters should count as a ...
Read now
Unlock full access