Some Unix Command Line Exercises Using MorphGNT
The point here is not to actually teach how to use
bash or commands like
wc but rather to motivate their use in a gradual fashion with real use cases and to structure what to actually look up when learning how to use them.
This little set of commands has served me well for over twenty years working with MorphGNT in its various iterations (although I obviously switch to Python for anything more complex).
Clone https://github.com/morphgnt/sblgnt in git.
wc and the concept of wildcards/globbing (and relying on the fact I have one line-per-word in those files) work out how many words are in the main text of SBLGNT.
wc work out how many times μονογενής appears. (You might be able to do it with just
grep and appropriate options, but try using
grep without options and
wc and understand the concept of “piping” the output of one command to the input of another)
How many verbs (tokens) are there in John’s gospel? (still doable just with
How many unique verbs (lemmas) are there in John’s gospel?
(learn how to use
awk to extract fields, and how to use
uniq in tandem)
What are the 5 most common verbs (lemmas) in John’s gospel? (you might want to use
Get counts in John’s Gospel of how many tokens appear in each tense/aspect (hint: use
cut) and write the results to a file called
john.txt rather than just output it in the terminal.
Come up with your own question that you think could be answered using the types of operations and try it out.