From: Jim Date: 2006-01-08T17:08:01+09:00 Subject: Re: How do you sort a text file? 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". > > > -- > Posted via http://www.ruby-forum.com/. Why can't I just let these things go? i use: $ sort -o outfile.txt infile.txt No pipes, and you can use the same file name if you don't want to keep both files.