The goal of these snippets is to count the number of usernames in the participants file. There are a lot of ways to do this, but we have collected a few here. Please submit pull requests if you have a neat or interesting solution you'd like to add.
cat participants.md | grep " -" | wc -l
cat
spits the data fromparticipants.md
ontostdout
grep "- "
selects only those lines with a markdown list elementwc -l
counts the lines in the result
grep " -" participants.md -c
grep -c
counts the lines of the result, and it accepts a list of files to search through.