News for hackers. Stuff that matters.
Re:Using Ruby instead of sed and awk by jonathonf on Thursday February 12, 2015 @12:30PM (#9039986)
Instead of:

    cat foo.txt | ruby -ne 'BEGIN{ $x=[]}; $x << $_.chomp; END { puts $x.sort }'
just use `sort`:

    sort foo.txt
There's a reason these commands already exist. :)

There are no comments on this comment yet.