updated git and svn scripts
[xrzperl.git] / htmlconv_foldername
bloba94146508053e52c0c89d7b8215993bd9f1cced5
1 #!/usr/bin/perl -w
2 ###APPNAME: htmlconv_foldername
3 ###APPAUTHOR: duel
4 ###APPDATE: 2009-04-17 01:08:39
5 ###APPVER: 0.1
6 ###APPDESC: htmlconv_foldername
7 ###APPUSAGE:
8 ###APPEXAMPLE: htmlconv_foldername
9 ###APPOPTION:
10 use strict;
12 #ENV variable MUST be defined somewhere,
13 #FOR perl to search modules from,
14 #OR nothing will work
15 use lib $ENV{XR_PERL_MODULE_DIR};
17 use MyPlace::Script::Usage qw/help_required help_even_empty/;
18 exit 0 if(help_required($0,@ARGV));
19 #exit 0 if(help_even_empty($0,@ARGV));
21 my $exp="";
22 while(@ARGV) {
23 my $from=shift;
24 my $to=shift;
25 last unless($from and $to);
26 $exp = $exp . 's#' . $from . '[\\\/]#' . $to . '\/#g;';
28 die("Nothing to do!\n") unless($exp);
30 my @files;
31 while(<STDIN>) {
32 chomp;
33 push @files,$_;
35 my @cmd = ("sed","-i","-e",$exp,@files);
36 exec @cmd;
37 #print STDERR @cmd;