Assorted bash tools -- very specific use, probably don't work correctly