using perl, I haven't tested the script below but it should work if there
are no syntax errors.
#####
opendir (DIR, "/path/to/taglibs/display");
@files = grep { /\.jsp$/ } readdir (DIR);
closedir (DIR);
foreach (@files) {
open (F, "/path/to/taglibs/display/$_");
while (<F>) {
$contents .= $_;
}
close (F);
$contents =~
s/http\:\/\/jakarta.apache.org\/taglibs\/display/WEB-INF\/display\.tld/g;
open (OUT, ">/path/to/taglibs/display/$_");
print OUT $contents;
close (OUT);
}
#####
On Fri, 11 Oct 2002 [EMAIL PROTECTED] wrote:
> hello guys,
> sorry because i got no programming background so please bear with me. anyway
> my problem is my boss want's me to edit all his created jsp files in a
> certain tomcat directory and change in all his jsp application with a .jsp
> extension a line entry that says http://jakarta.apache.org/taglibs/display
> to all be changed as
> /WEB-INF/display.tld
>
> how can this be accomplished is there any tool or script you can share to me
> so that i can do it automatically without manually editing all files.
> any ideas or suggestions are welcome.
>
> thanks and regards,
> allan
>
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]