root/feedmelinks/bin/abc-ify.pl

Revision 967, 352 bytes (checked in by fml, 2 years ago)

script to do the renaming

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1 #!/usr/local/bin/perl
2
3 opendir(DIR, "." ) || die "can't opendir .: $!";
4 @dirs = readdir(DIR);
5 foreach( @dirs ) {
6         if( -d $_ && !( m/^\.$/ || m/^\.\.$/ )) {
7                 $u = $username = $_;
8                 $u =~ s/(.){1}.*/$1/;
9                 $u =~ tr/A-Z/a-z/;
10                 mkdir $u unless( -d $u );
11                 print "$username -> $u/$username\n";
12                 rename( $username, "$u/$username/");
13
14         }
15 }
16
17 closedir DIR;
18
Note: See TracBrowser for help on using the browser.