#!/bin/bash for i in include content bib; do grep --color '%*TODO' $i/* done | if [[ "$@" == "--summary" ]]; then echo $(wc -l)" Todos" else cat fi