Skip to content

Instantly share code, notes, and snippets.

@warseph
Created January 10, 2013 14:52
Show Gist options
  • Select an option

  • Save warseph/4502597 to your computer and use it in GitHub Desktop.

Select an option

Save warseph/4502597 to your computer and use it in GitHub Desktop.
Print all */*.TODO files in a folder (to use with sublime PlainTasks and GeekTools)
#!/bin/bash
for TODO in `ls $1/*/*.TODO`
do
printf '\033[34m=================================\n'
dirname $TODO | awk '{print toupper($0)}'
printf '=================================\033[0m\n'
cat $TODO | perl -C -e 'use utf8;' -pe 's/✔/\033[32m✔\033[0m/i' | perl -C -e 'use utf8;' -pe 's/(^[^:]+:$)/\033[31m$1\033[0m/i'
echo
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment