The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 06:06 PM
Perl module question hankooknara Shell Programming and Scripting 3 07-08-2007 07:26 AM
PERL DBI module install jerardfjay Shell Programming and Scripting 3 10-27-2006 10:29 AM
Help needed in Perl LWP module dayanandra Shell Programming and Scripting 1 10-05-2006 09:47 AM
Writing perl module jo_aze Shell Programming and Scripting 4 08-06-2003 11:10 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-01-2005
rahulrathod rahulrathod is offline
Registered User
  
 

Join Date: Sep 2004
Location: Mumbai-India
Posts: 158
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
  #2 (permalink)  
Old 12-01-2005
sssow sssow is offline
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
  #3 (permalink)  
Old 12-02-2005
rahulrathod rahulrathod is offline
Registered User
  
 

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

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

Regards,
Rahul.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:46 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0