How to get a random line from a file in Bash
Great collection how to do this. I’m a bit sad that OS X doesn’t have GNU sort
with the -R
option. The awk
solution works well for me. Use printf
to not output a new line at the end. (Nicer-ish for GeekTool)