Saturday, 28 March 2009

Get PDF Word Count In Linux

Quick easy way to get the word count of a pdf.


# pdfwc.sh
# usage ./pdfwc.sh filename.pdf
#
TMPFILE=___tmpfile.tmp
pdftotext $1 $TMPFILE
wc $TMPFILE -w
rm $TMPFILE

3 comments:

  1. [...] Get PDF Word Count In Linux | Development Blog (tags: pdf wordcount word count scripts cli bash) [...]

    ReplyDelete
  2. Would probably do:
    #!/bin/sh
    # pdfwc.sh
    # usage ./pdfwc.sh filename.pdf
    #
    pdftotext $1 - | wc -w
    #__EOF__

    instead.

    ReplyDelete
  3. The Holiday Inn Eilat Patio hotel offers pleasant and intimate guestrooms, some of which boast charming balconies facing

    ReplyDelete