blob: acb6fd284b31b0d67852f852ba7107d8088a23ae (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/usr/bin/perl
# usage: cd ColaBBS/home; perl cnthomedir.pl
use IO::All;
foreach( <*> ){
next if( !-d $_ || /\./ );
$USERDATA < io("$_/USERDATA.DAT");
($userid) = $USERDATA =~ /^(\w+)/;
$c = substr($userid, 0, 1);
`mv ~/home/$c/$userid ~/tmp/; mv $_ ~/home/$c/$userid`;
print "$_ => $userid\n";
}
|