HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 11th, 2000, 01:18 PM
los2mags los2mags is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 5 los2mags User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Does anyone know of an app or script that handles global search and replace in the RedHat Linux operating system? I'm not having any luck finding one. I need to make a url change to about 300 html and cgi files and don't want to hose the file permissions by doing it in windows and replacing.

Thanks!

Reply With Quote
  #2  
Old July 11th, 2000, 06:35 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>I need to make a url change to about 300 html and cgi files

Such script wouldn't be too difficult to write.
Why didn't you use "include" in the first place?

Reply With Quote
  #3  
Old July 11th, 2000, 07:39 PM
los2mags los2mags is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 5 los2mags User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I've just recently taken on this project well into development. Kind of new to dealing with unix.

I'm also not sure how productive your comment is. Did you intend to provide some sort of help?

Reply With Quote
  #4  
Old July 11th, 2000, 07:56 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>I need to make a url change to about 300 html and cgi files

So I assume you have some kind of programming background. Perl?

>>Did you intend to provide some sort of help?
Definitely.
"Why didn't you use "include" in the first place?"
What I meant is if you or the original web developer used "include" to include the URL to those 300 files, it would save you time to update each file.

Reply With Quote
  #5  
Old July 12th, 2000, 03:25 PM
talambert talambert is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 36 talambert User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
You should easily be able to do a global search and replace in Unix without PERL or anything. Unix excells at using regular expressions and manipulating text. Look at the man pages for sed (stream editor) for a starter. There are probably 50 methods for doing this, but if you go look at some Unix book in the bookstore, you should be able to find the Utility you want (Unix Power Tools might be a good place to start - that's a book title).

Cheers
Tom

Reply With Quote
  #6  
Old July 12th, 2000, 07:11 PM
los2mags los2mags is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 5 los2mags User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks Tom, I'll take a look at that book. I actually did figure it out using sed. There's another cool command line utility I found called rpl.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Global Search/Replace Linux


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway