Useful One-Line for Mac OS X Users

Today I needed to quickly reverse the order of rows in a LaTeX table. This command nicely did the trick:

pbpaste | awk '{ line[NR] = $0 } END { for (i=NR;i>0;i--) print line[i] }'

I stole the awk piece from here.