Ns126:Calendar/NOTES/2015-4-19: Difference between revisions
Jump to navigation
Jump to search
>Shicheng (Created page with " <nowiki> #!/usr/bin/perl use Cwd; my $dir=getcwd; chdir $dir; my @file=glob("*.tar.gz"); foreach my $file(@file){ my ($sample,undef)=split /.tar.gz/,$file; print "$sample\n...") |
>Shicheng No edit summary |
||
Line 15: | Line 15: | ||
system("rm -rf $sample"); | system("rm -rf $sample"); | ||
} | } | ||
< | </nowiki> |
Revision as of 07:37, 19 April 2015
#!/usr/bin/perl
use Cwd;
my $dir=getcwd;
chdir $dir;
my @file=glob("*.tar.gz");
foreach my $file(@file){
my ($sample,undef)=split /.tar.gz/,$file;
print "$sample\n";
system("tar xzvf $file");
system("mv -f $dir/$sample/* $dir/");
system("rm -rf $sample");
}