Saturday, January 7, 2012

reverse a file

awk '{ a[NR]=$0 } END { for(i=NR; i; --i) print a[i] } ' datafile

No comments:

Post a Comment