First off, at the beginning of the "data wrangling" section, in the example output for the look
command, you say that you are running the command look phy|head -n 10
but the output does not show words beginning with phy
. It instead shows word beginning with Phi
. I would change this section to:
##### Print some words that start with a particular string (e.g. words start with 'phy')
```bash
# If file is not specified, the file /usr/share/dict/words is used.
look phy|head -n 10
# Phyciodes
# phycite
# Phycitidae
# phycitol
# phycochromaceae
# phycochromaceous
# phycochrome
# Phycochromophyceae
# phycochromophyceous
# phycocyanin
```
##### Find common/differing lines
The command `comm` can be used to find lines common to two files (intersection), or to find lines in one file and not in another file. **Warning**: input files must be sorted.
```bash
# Sort input before handing to comm; the -o option lets you sort a file in-place
sort -o bad-actors.txt bad-actors.txt
sort -o invited-guests.txt invited-guests.txt
# Find lines in both files
comm -12 bad-actors.txt invited-guests.txt
# Find lines in invited-guests.txt that are NOT in bad-actors.txt
comm -13 bad-actors.txt invited-guests.txt
# Find lines that are in good-actors.txt but NOT in invited-guests.txt.
# Note that since we didn't sort good-actors.txt above, we need to sort it before handing it to comm
comm -23 <(sort good-actors.txt) invited-guests.txt
```