Quote from: Databits on September 15, 2008, 05:46:50 PM
It's as easy as pie.Code Selectperl -p -i -e 's/target/replacement/g' $(find -name '*.htm')
The difference being that this just modifies the files directly, rather than making a copy. You should probably look into "regular expressions" as well, since you'll be using them in any sort of mass replacement on Linux (even in Xepher's version).
Where do I edit this to call the directory the files are in?
Also, I've been working with Xepher's... doesn;t seem to work. I assume I open up the "console" on WinSCP, and enter it in. Well, since the files are HTM, I adjusted accordingly.
Also, I want to replace
Code Select
<a href="index.php">to
Code Select
<a href="http://fesandernst.com">But going through a bunch of backwards slashes before every non-character, it didn't work. So I decided just to change the "php" to "html", So I could so the same, and change them back to "php" later, when I change the index page back... so:
Code Select
find /home/fesworks/public_html/PSI/crappy/ -iname "*.htm" -exec sed -i 's/php/html/g' {} ;Didn't even work. Ran into a syntax error and quit. :/
Also, I guess, I was hoping that I could have done something that could find and replace an entire blocking of code in multiple files, but it does not look like this code is capable of doing that.
I'm gonna try the Dreamweaver thing next.
I believe that some of the issue for the outage was The Podcast. Even though it was not a huge podcast, it still was the biggest drain on resources/bandwidth last I checked. Towards the end, I started to suspect constant 60+ minute MP3 downloads were sapping the data center's... whatever it is... for Xepher's server. It's seemed to not do that any more since the show hasn't been here all August.