From b9d3d6b1c2f1cc215326d89c5286c76b9c3854c5 Mon Sep 17 00:00:00 2001 From: Colin Patrick Mccabe Date: Sun, 23 Sep 2012 15:51:24 -0700 Subject: [PATCH] Add renamer.pl to rename files Signed-off-by: Colin McCabe --- renamer.pl | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) create mode 100755 renamer.pl diff --git a/renamer.pl b/renamer.pl new file mode 100755 index 0000000..93a0d37 --- /dev/null +++ b/renamer.pl @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +$op = shift or die $help; +chomp(@ARGV = ) unless @ARGV; +for (@ARGV) { + $was = $_; + eval $op; + die $@ if $@; + rename($was,$_) unless $was eq $_; +} -- 1.6.6.rc1.39.g9a42