Select a random line from a file (in bash)

I need this every so often, and I keep on having to rediscover it. So here it is: a bash function that prints a random line from a given file:

randline () { tail -n +$(expr $RANDOM % $(wc -l $1 | cut -d\  -f1) + 1) $1 | head -n1; }