Replaced "tac" with "awk" because OSX doesn't have tac