Mercurial > ec-dotfiles
comparison bin/rmcrc @ 116:66c32422a3d4
Forgot to enable.
author | Edho Prima Arief <edho@myconan.net> |
---|---|
date | Fri, 21 Oct 2011 13:38:32 +0700 |
parents | 7c3cdb235bbb |
children |
comparison
equal
deleted
inserted
replaced
115:7c3cdb235bbb | 116:66c32422a3d4 |
---|---|
3 use warnings; | 3 use warnings; |
4 use strict; | 4 use strict; |
5 use File::Basename; | 5 use File::Basename; |
6 | 6 |
7 my @files = @ARGV or print("Usage: ",basename($0)," file1 ... fileN\n") && exit(1); | 7 my @files = @ARGV or print("Usage: ",basename($0)," file1 ... fileN\n") && exit(1); |
8 my $skip=1; | 8 my $skip=0; |
9 foreach (@files) { | 9 foreach (@files) { |
10 print(qq(Could not find file "$_", skipping\n)) and next() unless -e $_; | 10 print(qq(Could not find file "$_", skipping\n)) and next() unless -e $_; |
11 my $newname = $_; | 11 my $newname = $_; |
12 $newname =~ s/\[[[:xdigit:]]{8}\]//i; | 12 $newname =~ s/\[[[:xdigit:]]{8}\]//i; |
13 $newname =~ s/ *(\.\w+)$/$1/; | 13 $newname =~ s/ *(\.\w+)$/$1/; |