CHG: OS X compat, awk instead of cut

Fix for OS X and cleaner IMHO.