this somewhat reminds me of taco bell programming http://widgetsandshit.com/teddziuba/2010/10/taco-bell-progra...
I love these kind of “counterculture” uses of UNIX tools to solve hard problems. The boundary of “where to stop using xargs, awk, and grep and start using Python” is pretty blurry for a surprising number of tasks, especially if you’re willing to invest in mastering those tools!