X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/61d7dd11d4a450a64f2817ee4db0ec7fa5880b42..b9e4a0c3af29391c27e9a020693541b9a86c4d14:/bin/fix_numbering/fixMPFC?ds=inline diff --git a/bin/fix_numbering/fixMPFC b/bin/fix_numbering/fixMPFC new file mode 100755 index 0000000..25015bf --- /dev/null +++ b/bin/fix_numbering/fixMPFC @@ -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 -= 14; + $n = length($n) == 1 ? "0$n" : $n; + s/\d{2}/2x$n/; + + + print "$old_file -> $_\n"; + rename($old_file,$_); +}