Changed tac to tail -r

tac is not available on mac, but tail is.