Reversing a file?

Jay A. Konigsberg jak at sactoh0.UUCP
Thu Oct 5 10:37:15 AEST 1989


In article <MONTNARO.89Oct2224215 at sprite.crd.ge.com> <montanaro at crdgw1.ge.com> (Skip Montanaro) writes:
>>Does somebody have an elegant shell script for reversing the lines of a
>>file? I've come up with the following short one:

><Recursive code deleted>

>Ready?
>			   **  tail -r  **

>Anything else you want?

This is a nice, clean way to do it, though " tail " had (has?) a
bug (feature?) relating to file size. It can't (won't) create a
file larger than 512 blocks. Depending on the size of the original
file, it could create a problem.

-- 
#############################################################
#  Jay Konigsberg	     # (916) 484-6029		    #
#  SAC-UNIX, Sacramento, Ca. # UUCP=...pacbell!sactoh0!jak  #
#############################################################



More information about the Comp.unix.questions mailing list