27 lines
379 B
Perl
Executable File
27 lines
379 B
Perl
Executable File
#!/usr/bin/perl -w
|
|
|
|
my @files=`ls vim-views/ | grep view`;
|
|
my $cwd=`pwd`;
|
|
chomp($cwd);
|
|
|
|
$cwd=~s!(.*?)/VBS!$1!;
|
|
|
|
print $cwd;
|
|
|
|
chdir("vim-views");
|
|
|
|
foreach my $file (@files) {
|
|
chomp($file);
|
|
system("mv", "$file", "$file.bak");
|
|
open(IN,"<$file.bak");
|
|
open(OUT, ">$file");
|
|
|
|
while(<IN>) {
|
|
s!(edit\s).*?(/VBS.*)!$1$cwd$2!;
|
|
print OUT;
|
|
}
|
|
|
|
close(IN);
|
|
close(OUT);
|
|
}
|