Re: One Liner to reverse sort file

From: Ala Qumsieh (notvalid_at_email.com)
Date: 03/11/05


Date: Thu, 10 Mar 2005 23:08:37 GMT

jl_post@hotmail.com wrote:

>>hogg wrote:
>>
>>>I was wondering if there was a one liner that would reverse
>>>order a file w/o having to write the output to another file.
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> If I remember correctly, there was an even shorter solution given as
> an answer to a problem in Randal L. Schwartz & Tom Phoenix's book
> "Learning Perl":
>
> perl -e "print reverse <>"
>
> Quite elegant, in my opinion. :)

Except that it doesn't fulfill the OP's requirement of in-place editing
of the file.

--Ala



Relevant Pages

  • Re: Image study of Carnival Cruise Lines
    ... Tom> As far as factors in picking a cruise line... ... Tom> is picking any cruise line OTHER than Carnival.... ... were actually written by George. ... It was Tom's opinion. ...
    (rec.travel.cruises)
  • Re: Image study of Carnival Cruise Lines
    ... Tom> As far as factors in picking a cruise line... ... Tom> is picking any cruise line OTHER than Carnival.... ... It was Tom's opinion. ... On ALL issues, it's a matter of "credibility", I have MY OWN opinion, ...
    (rec.travel.cruises)
  • Re: Tom Kaufman- RIP
    ... Tom finds a way to suppress his feelings toward the sopranos in the ... repertoire and singers. ... humorously derogatory remark about a singer I subsequently revealed ... singer personally and that it was only his opinion which he hoped had ...
    (rec.music.opera)
  • Re: A basic question about hashing
    ... Tom St Denis wrote: ... >> If I propose something or put up an opinion for examination ... >> personal aninosity etc and reflecting the meanness of one's ... You can't just randomly blurt out ...
    (sci.crypt)
  • Re: Can a regular Turing Machine provide Protected Memory?
    ... > opinion, the cited proof is nowhere near simple or elegant ENOUGH. ... better *and* make all the necessary infrastructure explicit. ... > he is just going to be using intuitive reasoning and he is going to ...
    (sci.logic)