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 );
Related posts:
- Verifying file integrity with debsums
After upgrading my Ubuntu server, some security applications grumped about changed contents of some common binaries. Just to be safe, I wanted to verify them explicitly with debsums, but debsums...... - Recursive sort-by-modification-time
This certainly isn’t rocket science, but it also is certainly not something you want to type more than once. find . -type f -printf '%T@\t%p\n' | sort -n | cut......