Forum Moderators: travelin cat

Message Too Old, No Replies

Is there an OSX program to search and replace text in text/html files?

(In thousands of files at the same time.)

         

Jesse_Smith

6:04 am on Jan 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



For example, changing

<?php include("inc/

to

<!--#include virtual="/cgi-bin/

in thousands of files at the same time.

There's TexFinder but that's for OS 9/Classic. Is there a program for OSX that can search and replace text in thousands of text files at once? Or can Terminal do that?

sonjay

10:53 am on Jan 3, 2006 (gmt 0)

10+ Year Member



Terminal can probably do it, but I'm not enough of an expert on those things to know how in Terminal.

skEdit is a text editor with multi-file find-and-replace -- you can have it F&R an entire site (as defined in its "Site Manager"), or in specified folders or files. I'm running the demo version right now, and liking it enough that I'll probably pay the shareware fee to keep using it when my demo period is up.

I loved NisusWriter under OS9 for its fantastic F&R, including its multi-file F&R capability. I haven't been able to develop a similar liking for NisusWriter Express under OSX, but it probably does have multi-file F&R.

incywincy

12:33 pm on Jan 3, 2006 (gmt 0)

10+ Year Member



bring up a terminal window and use sed to edit your files. a tutorial can be found for sed at [gabeanderson.com ]

t_zuk

10:30 pm on Jan 3, 2006 (gmt 0)

10+ Year Member



Bare Bones' TextWrangler

[barebones.com...]

islandlizard

4:08 am on Jan 4, 2006 (gmt 0)

10+ Year Member



Paid software:
BBEdit (THE essential text editor for any mac coder/programmer)

Free: Terminal & GREP

Both will do what you want. I recommend any mac web person, be them a designer, coder, scripter or programmer own a copy of BBEdit - its an awesome tool.

wholesteve

4:17 am on Jan 4, 2006 (gmt 0)

10+ Year Member



As said above, BBEdit by BareBones Software is the way to go — there's really no other way to go! It's probably one of the best pieces of software out there. If you every do any text editing on the Mac, this is a required product.

TextWrangler is their freeware editor (I think it's what used to be called BBEdit Lite, which was the free, more limited version of BBEdit). Or, you can download a free trial version of BBEdit, which runs fully for a limited period of time (I think it's 30 days).

Honestly, this is not an ad: These guys are so good, people should know about their products.