|-----Original Message----- |From: tclug-list-admin at mn-linux.org |[mailto:tclug-list-admin at mn-linux.org]On Behalf Of Troy.A Johnson |Sent: Wednesday, October 03, 2001 11:41 AM |To: tclug-list at mn-linux.org |Subject: Re: [TCLUG] counting words and other woes | | |There may be a more vi (or vim/vile/elvis/...) way to do it, |but this come to mind. Save the current doc: | | :w | |and then run 'wc' in a subshell: | | :! wc -w name-of-your-file.txt | |and it should tell you what you want to know. | |Good luck, | |Troy | |>>> fish at slava.net 10/03/01 11:30AM >>> |I know there is a way to tell how many words are in a text document, but |I don't know what it is. Can someone let me know? Also, is there a way |to do it from within vi? Did a search of O'Reilly's Unix CD Bookshelf version of Learning the vi editor (6th Edition), and it doesn't have anything. Troy's idea was what came to my mind initially, the other possibility is when you first load a file it tells you the total number of characters and lines. The average word is 5 characters long, so you could do a quick calculation on that :(