in reply to Re: Reversing A File
in thread Reversing A File

If you don't have tac on your system (which some of our AIX boxes don't), you can also use this short script,
#!/bin/sh file=$1; i=1 max=`wc -l $file | cut -d' ' -f1,1 ` while [ $i -le $max ]; do tail -$i $file | head -1 i=$((i+1)) done
Call it much like tac,
$ ./reverse your.file > reverse.file
It's not as fast as tac obviously, but if you don't have 'tac' and want to reverse a file it does work.

---
s;;:<).>|\;\;_>?\\^0<|=!]=,|{\$/.'>|<?.|/"&?=#!>%\$|#/\$%{};;y;,'} -/:-@[-`{-};,'}`-{/" -;;s;;$_;see;
Warning: Any code posted by tuxz0r is untested, unless otherwise stated, and is used at your own risk.