X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/61d7dd11d4a450a64f2817ee4db0ec7fa5880b42..b9e4a0c3af29391c27e9a020693541b9a86c4d14:/bin/fix_numbering/fixVoyager diff --git a/bin/fix_numbering/fixVoyager b/bin/fix_numbering/fixVoyager new file mode 100755 index 0000000..e9deb8d --- /dev/null +++ b/bin/fix_numbering/fixVoyager @@ -0,0 +1,22 @@ +#! /usr/bin/perl + +################################################################### +# This script fixes the series numbering for season 2 of Monty # +# Python's Flying Circus # +################################################################### + +use warnings; +use strict; + +while (<*>) { + my $old_file = $_; + /(\d{2})/; + my $n = scalar $1; + $n += 1; + $n = length($n) == 1 ? "0$n" : $n; + s/(\d)x\d{2}/$1x$n/; + + + print "$old_file -> $_\n"; + rename($old_file,$_); +}