{"id":61,"date":"1997-09-09T01:36:29","date_gmt":"1997-09-09T09:36:29","guid":{"rendered":"http:\/\/www.birdhouse.org\/betips\/?p=61"},"modified":"1997-09-09T01:36:29","modified_gmt":"1997-09-09T09:36:29","slug":"get-word-and-line-counts","status":"publish","type":"post","link":"https:\/\/www.betips.net\/?p=61","title":{"rendered":"Get  word and line counts"},"content":{"rendered":"<p>If you prefer to write in a plain text editor such as StyleEdit, Pe, or Eddie, but need the word count feature usually only found in commercial word processors, check out the command-line word counter packaged in BeOS &#8212; a version of the Unix &#8222;wc&#8220; program.<br \/>\nJust open a Terminal window and CD to the location of the file you&#8217;re working on. Type <code>wc -w filename.txt<\/code> and the shell will spit back the current word count.<br \/>\n Keep the Terminal window open in the background and all you have to do to repeat the command is hit the Up arrow and hit return. I&#8217;ve found this is actually faster and easier than using the word count feature in other word processors.<br \/>\nYou can also use wc to count the number of lines in a file by using the -l flag, as in <code>wc -l filename.txt<\/code>. This can be very useful in combination with other shell commands. For example, see the tip <a HREF=\"\/chunga.php?ID=143\">Parsing web logs with grep<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you prefer to write in a plain text editor such as StyleEdit, Pe, or Eddie, but need the word count feature usually only found in commercial word processors, check out the command-line word counter packaged in BeOS &#8212; a version of the Unix &#8222;wc&#8220; program. Just open a Terminal window and CD to the [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[11],"class_list":["post-61","post","type-post","status-publish","format-standard","hentry","tag-terminal"],"_links":{"self":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts\/61","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=61"}],"version-history":[{"count":0,"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts\/61\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}