Re: One Liner to reverse sort file
From: Ala Qumsieh (notvalid_at_email.com)
Date: 03/11/05
- Next message: mboso: "Re: gtk + png"
- Previous message: PerlFAQ Server: "FAQ 8.2 How come exec() doesn't return?"
- In reply to: jl_post_at_hotmail.com: "Re: One Liner to reverse sort file"
- Next in thread: jl_post_at_hotmail.com: "Re: One Liner to reverse sort file"
- Reply: jl_post_at_hotmail.com: "Re: One Liner to reverse sort file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: mboso: "Re: gtk + png"
- Previous message: PerlFAQ Server: "FAQ 8.2 How come exec() doesn't return?"
- In reply to: jl_post_at_hotmail.com: "Re: One Liner to reverse sort file"
- Next in thread: jl_post_at_hotmail.com: "Re: One Liner to reverse sort file"
- Reply: jl_post_at_hotmail.com: "Re: One Liner to reverse sort file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|