Hints and Kinks

Tips and tricks and howtos galore

Main menu

Skip to primary content
Skip to secondary content
  • Home
  • About
  • Must-Have Mac OS X Tools

Tag Archives: perl

Randomly sort the lines in a file

Posted on January 31, 2009 by matthew
2

There are times when you need to randomly order the lines in a file. Here’s a script to do just that:

#!/usr/bin/perl -w

use strict;
use List::Util 'shuffle';

my @lines = <>;
print shuffle( @lines );
Posted in Technical HOWTOs | Tagged perl | 2 Replies

Links

  • closure_tree
  • gigasync
  • github
  • jwhich
  • Resume
  • twitter

Categories

  • Photography (5)
  • Software Development Mantras (5)
  • Technical HOWTOs (106)

Tags

annotations apache2 aws backups bash chrome crashplan cron eclipse email gem git greasemonkey hibernate hudson imagemagick iphone java javascript karmic linux mac mac os x macports maven maven2 mobileme mysql openvpn php phusion passenger quirksmode raid rails ruby rvm security shell hackery Software Development Mantras ssh sysadmin tdd tricks tunnelblick ubuntu

Archives

  • July 2011
  • May 2011
  • March 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • March 2010
  • February 2010
  • December 2009
  • November 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • February 2009
  • January 2009
  • November 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • January 2005
  • October 2004
Proudly powered by WordPress