Subject: Re: How do you sort a text file?
From: "William James" <w_a_x_man yahoo.com>
Date: Fri, 6 Jan 2006 17:08:10 +0900
References: 174374
Danny Abc wrote:
> I'm new to Ruby and was wondering how to sort a text file?
>
> With UNIX scripts, I just use "cat input.txt | sort > output.txt".
ruby -e 'puts ARGF.sort' input1.txt input2.txt input3.txt