The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
[PERL] Running unix commands within Perl Scripts userix Shell Programming and Scripting 1 05-28-2008 03:06 PM
Perl module question hankooknara Shell Programming and Scripting 3 07-08-2007 04:26 AM
PERL DBI module install jerardfjay Shell Programming and Scripting 3 10-27-2006 07:29 AM
Help needed in Perl LWP module dayanandra Shell Programming and Scripting 1 10-05-2006 06:47 AM
Writing perl module jo_aze Shell Programming and Scripting 4 08-06-2003 08:10 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-01-2005
Registered User
 

Join Date: Sep 2004
Location: Mumbai-India
Posts: 156
Replace Perl Module name in all Perl scripts

I want to replace a Perl module name in all my Perl Scripts in the cgi-bin directory. How is it possible?

I have the following statement in my scripts

use myUtil;

I want to change it to

use myUtil777;

Regards,
Rahul
Reply With Quote
Forum Sponsor
  #2  
Old 12-01-2005
Registered User
 

Join Date: Aug 2001
Posts: 179
You can use perl itself

for filename in *.pl
do
perl -p -i.bak -e "s/myUtil/myUtil777/g" $filename
done
Reply With Quote
  #3  
Old 12-01-2005
Registered User
 

Join Date: Sep 2004
Location: Mumbai-India
Posts: 156
One mroe soln which i got

find . –name *.pl –type f | xargs perl -pi -e 's/myutil/myutil777/g'

Regards,
Rahul.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 02:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0