Sorry, I thought I forgot to add this code at the beginning:
cp -Rp doument_directory document_directory.orig
cd document_directory
for file in *
do
docx2txt "${file}" > "${file}.txt" && mv "${file}.txt" "${file}.doc"
done
if your system doesn't have docx2txt utility, you can get it from http://sourceforge.net/projects/docx2txt/
Caveat emptor: Line break formatting of MS Word documents may (and most probably will) differ from that of UNIX. So the line count may not be accurate but, these should do what you are looking for :
wc file.doc
you will see an output like this :
28 377 1492
First number is the number of lines, second, number of words and third is the number of characters.
If you want to do only one type of count at a time, you can do:
For number of lines
wc -l file.doc
For number of words
wc -w file.doc
For number of characters
wc -c file.doc
And you will get a single number followed by the file name.