Monday, September 14, 2009

Output a file in reverse order

Use the tac command to output a file in reverse order, last line first. For example: toro@moutere:~$ echo -e "1\n2\n3\n4" | tac
4
3
2
1
toro@moutere:~$

No comments:

Post a Comment