123456789101112131415161718192021222324252627 |
- #!/usr/bin/perl -w
- if ($#ARGV != 0 ) #check correct number of arguments
- {
- print "error: wrong number of arguments\n";
- print "usage: copylearnedweights <TrialNr>\n\n";
- exit(5);
- };
- my($TrialString)="$ARGV[0]";
- my($slen) = length($TrialString);
- print "Stringlänge= $slen\n";
- my(@files) = glob "*weights.dat$TrialString";
- my($src);
- my($dst);
- foreach $src (@files)
- {
- $dst = substr($src,0,length($src)-$slen);
- # print "sourcefilename=$src targetfilename=$dst\n";
- print "cp -r $src $dst\n";
- system("cp -r $src $dst");
- }
- print "fertig\n\n";
|