From: Massimiliano Mirra Date: 2002-10-19T01:02:56+09:00 Subject: Re: one liner? --- need help splitingi a file On Fri, Oct 18, 2002 at 11:59:11PM +0900, Michael Campbell wrote: > > $ cat file | ruby -e 'STDIN.read.split(/\n\n/).each_with_index > > {|part,i| File.open("f.#{i}", "w").puts(part) }' > You can save a _few_ CPU cycles by removing cat there, no? Or am I > missing something subtle. Or you just meant ruby -e ...