Re: reading from file bottom up

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Matt Graham
Date:  
To: Main PLUG discussion list
Subject: Re: reading from file bottom up
From: "Jeremy C. Reed" <>
> On Fri, 28 Dec 2007, Nathan Aubrey wrote:
> > tac . I love the ingenious designs of *nix.
> Not all *nix.
> tac(1) is from coreutils commonly used on Linux systems.
> Many *nix systems don't have "tac".
> I use "tail -r" on some systems. And use sed on other systems.


perl -e 'print reverse <>' < file

...many things have Perl installed now, after all. NOTE: Doing
this on a file over about 20 M may cause thrashing if you don't
have a lot of RAM.

> Do a google search and you will find many ways to reverse a file.


Aye. Also multiple definitions of "reverse"; do you want to reverse
bytes, or reverse lines? Usually it's the latter, but there are
always exceptions.


---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss