Getting Data Out of Wordij WRD Files

I decided to try using Wordij on a text I am teaching my freshmen, Richard Connell’s “The Most Dangerous Game.” I ran a plain text version of the short story through the application, and I came up with some interesting results. One frustration was that the prettily outputted nature of some of the Wordij files was not something Excel could immediately grasp. My friend Jon Kulp skipped past my weak regex-fu and offered the following solution:

awk -F " " '{ print $1 "," $2 }' spamandeggs.wrd > spam_words.csv

The above command does a nice job of grabbing the two “fields” — this is how awk thinks — of data on each line of text and then simply outputting them with a comma separating them, making them more readily available to Excel.

Oh, and for those of you who were wondering, you can import these files directly into Excel, but you have to go to Import… and not Open. (Yeah, I didn’t feel very bright when I learned this.)

Leave a Reply