Technology Questions

Go Back   Technology Questions > Manufacturer Questions > Manufacturers > Apple > Apple Macintosh Hardware

Apple Macintosh Hardware Discuss the Apple Macintosh Hardware

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 02-06-2007, 07:19 PM
BusyGuy
Newsgroup Contributor
 
Posts: n/a
Looking for a software tool to do a specific job please

Hi folks. OSX 10.47 G5 dual. I have a folder with a large number of
subfolders in it. In each folder is an html file. I need to make an
identical text change to each file. BBEdit is perfect for the job
but...I must open each file first. Surely there must be a utility that
will find-and-replace a text string in each file while it is not open.
I sure hope so, anyway.

(I even tried to use Dreamweaver. It reported all finds of the old text
string but did NOT make the change even though the menu commands
suggested that it would. Dreamweaver sure spent a lot of time working
through my request for no result!)

Thanks,

BG
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 02-06-2007, 07:19 PM
  #2 (permalink)  
Old 02-06-2007, 07:19 PM
Benjamin Esham
Newsgroup Contributor
 
Posts: n/a
Re: Looking for a software tool to do a specific job please

BusyGuy wrote:

> Hi folks. OSX 10.47 G5 dual. I have a folder with a large number of
> subfolders in it. In each folder is an html file. I need to make an
> identical text change to each file. BBEdit is perfect for the job but...I
> must open each file first. Surely there must be a utility that will
> find-and-replace a text string in each file while it is not open. I sure
> hope so, anyway.


If you are comfortable working with the command line, the 'sed' tool is
exactly what you want. Here's an example command that finds all HTML files
in the current directory and its subdirectories, and replaces "example1"
with "example2" (note that this should all be one line):

find . -type f -iname "*.html" -exec sed -i .bak -e
"s/example1/example2/g" \{} \;

HTH,
--
Benjamin D. Esham
bdesham******.com | AIM: bdesham128 | Jabber: same as e-mail
My friend, you would not tell with such high zest
To children ardent for some desperate glory,
The old Lie: Dulce et decorum est
Pro patria mori. — Wilfred Owen
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 02-06-2007, 07:19 PM
Benjamin Esham
Newsgroup Contributor
 
Posts: n/a
Re: Looking for a software tool to do a specific job please

BusyGuy wrote:

> Hi folks. OSX 10.47 G5 dual. I have a folder with a large number of
> subfolders in it. In each folder is an html file. I need to make an
> identical text change to each file. BBEdit is perfect for the job but...I
> must open each file first. Surely there must be a utility that will
> find-and-replace a text string in each file while it is not open. I sure
> hope so, anyway.


If you are comfortable working with the command line, the 'sed' tool is
exactly what you want. Here's an example command that finds all HTML files
in the current directory and its subdirectories, and replaces "example1"
with "example2" (note that this should all be one line):

find . -type f -iname "*.html" -exec sed -i .bak -e
"s/example1/example2/g" \{} \;

HTH,
--
Benjamin D. Esham
bdesham******.com | AIM: bdesham128 | Jabber: same as e-mail
My friend, you would not tell with such high zest
To children ardent for some desperate glory,
The old Lie: Dulce et decorum est
Pro patria mori. — Wilfred Owen
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 02-06-2007, 07:19 PM
BusyGuy
Newsgroup Contributor
 
Posts: n/a
Re: Looking for a software tool to do a specific job please

In article <NVAQg.1226$Ka1.137@news01.roc.ny>, Benjamin Esham
<bdesham******.com> wrote:

> BusyGuy wrote:
>
> > Hi folks. OSX 10.47 G5 dual. I have a folder with a large number of
> > subfolders in it. In each folder is an html file. I need to make an
> > identical text change to each file. BBEdit is perfect for the job but...I
> > must open each file first. Surely there must be a utility that will
> > find-and-replace a text string in each file while it is not open. I sure
> > hope so, anyway.

>
> If you are comfortable working with the command line, the 'sed' tool is
> exactly what you want. Here's an example command that finds all HTML files
> in the current directory and its subdirectories, and replaces "example1"
> with "example2" (note that this should all be one line):
>
> find . -type f -iname "*.html" -exec sed -i .bak -e
> "s/example1/example2/g" \{} \;
>
> HTH,



Thanks very much, Benjamin. I'm not comfortable with command line but
maybe it's time I learned. I'll give it a go.

Regards

BG
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 02-06-2007, 07:19 PM
BusyGuy
Newsgroup Contributor
 
Posts: n/a
Re: Looking for a software tool to do a specific job please

In article <NVAQg.1226$Ka1.137@news01.roc.ny>, Benjamin Esham
<bdesham******.com> wrote:

> BusyGuy wrote:
>
> > Hi folks. OSX 10.47 G5 dual. I have a folder with a large number of
> > subfolders in it. In each folder is an html file. I need to make an
> > identical text change to each file. BBEdit is perfect for the job but...I
> > must open each file first. Surely there must be a utility that will
> > find-and-replace a text string in each file while it is not open. I sure
> > hope so, anyway.

>
> If you are comfortable working with the command line, the 'sed' tool is
> exactly what you want. Here's an example command that finds all HTML files
> in the current directory and its subdirectories, and replaces "example1"
> with "example2" (note that this should all be one line):
>
> find . -type f -iname "*.html" -exec sed -i .bak -e
> "s/example1/example2/g" \{} \;
>
> HTH,



Thanks very much, Benjamin. I'm not comfortable with command line but
maybe it's time I learned. I'll give it a go.

Regards

BG
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #6 (permalink)  
Old 02-06-2007, 07:19 PM
Tim Murray
Newsgroup Contributor
 
Posts: n/a
Re: Looking for a software tool to do a specific job please

On Sep 21, 2006, BusyGuy wrote:
> Hi folks. OSX 10.47 G5 dual. I have a folder with a large number of
> subfolders in it. In each folder is an html file. I need to make an
> identical text change to each file. BBEdit is perfect for the job
> but...I must open each file first. Surely there must be a utility that
> will find-and-replace a text string in each file while it is not open.
> I sure hope so, anyway.
>
> (I even tried to use Dreamweaver. It reported all finds of the old text
> string but did NOT make the change even though the menu commands
> suggested that it would. Dreamweaver sure spent a lot of time working
> through my request for no result!)
>
> Thanks,
>
> BG


TextWrangler (barebones.com) has a process (although I've never used it) to
search for file name patterns to open. Then, when they're open, it's
search-replace function will search through all files, and it has Grep tools,
too.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #7 (permalink)  
Old 02-06-2007, 07:19 PM
Tim Murray
Newsgroup Contributor
 
Posts: n/a
Re: Looking for a software tool to do a specific job please

On Sep 21, 2006, BusyGuy wrote:
> Hi folks. OSX 10.47 G5 dual. I have a folder with a large number of
> subfolders in it. In each folder is an html file. I need to make an
> identical text change to each file. BBEdit is perfect for the job
> but...I must open each file first. Surely there must be a utility that
> will find-and-replace a text string in each file while it is not open.
> I sure hope so, anyway.
>
> (I even tried to use Dreamweaver. It reported all finds of the old text
> string but did NOT make the change even though the menu commands
> suggested that it would. Dreamweaver sure spent a lot of time working
> through my request for no result!)
>
> Thanks,
>
> BG


TextWrangler (barebones.com) has a process (although I've never used it) to
search for file name patterns to open. Then, when they're open, it's
search-replace function will search through all files, and it has Grep tools,
too.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #8 (permalink)  
Old 02-06-2007, 07:19 PM
BusyGuy
Newsgroup Contributor
 
Posts: n/a
Re: Looking for a software tool to do a specific job please

In article <0001HW.C13AE6340043038CF0203648@newsgroups.bellso uth.net>,
Tim Murray <no-spam@thankyou.com> wrote:

> On Sep 21, 2006, BusyGuy wrote:
> > Hi folks. OSX 10.47 G5 dual. I have a folder with a large number of
> > subfolders in it. In each folder is an html file. I need to make an
> > identical text change to each file. BBEdit is perfect for the job
> > but...I must open each file first. Surely there must be a utility that
> > will find-and-replace a text string in each file while it is not open.
> > I sure hope so, anyway.
> >
> > (I even tried to use Dreamweaver. It reported all finds of the old text
> > string but did NOT make the change even though the menu commands
> > suggested that it would. Dreamweaver sure spent a lot of time working
> > through my request for no result!)
> >
> > Thanks,
> >
> > BG

>
> TextWrangler (barebones.com) has a process (although I've never used it) to
> search for file name patterns to open. Then, when they're open, it's
> search-replace function will search through all files, and it has Grep tools,
> too.
>


Thanks, Tim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #9 (permalink)  
Old 02-06-2007, 07:19 PM
BusyGuy
Newsgroup Contributor
 
Posts: n/a
Re: Looking for a software tool to do a specific job please

In article <0001HW.C13AE6340043038CF0203648@newsgroups.bellso uth.net>,
Tim Murray <no-spam@thankyou.com> wrote:

> On Sep 21, 2006, BusyGuy wrote:
> > Hi folks. OSX 10.47 G5 dual. I have a folder with a large number of
> > subfolders in it. In each folder is an html file. I need to make an
> > identical text change to each file. BBEdit is perfect for the job
> > but...I must open each file first. Surely there must be a utility that
> > will find-and-replace a text string in each file while it is not open.
> > I sure hope so, anyway.
> >
> > (I even tried to use Dreamweaver. It reported all finds of the old text
> > string but did NOT make the change even though the menu commands
> > suggested that it would. Dreamweaver sure spent a lot of time working
> > through my request for no result!)
> >
> > Thanks,
> >
> > BG

>
> TextWrangler (barebones.com) has a process (although I've never used it) to
> search for file name patterns to open. Then, when they're open, it's
> search-replace function will search through all files, and it has Grep tools,
> too.
>


Thanks, Tim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #10 (permalink)  
Old 02-06-2007, 07:19 PM
eponymous cowherd
Newsgroup Contributor
 
Posts: n/a
Re: Looking for a software tool to do a specific job please

In article <210920061928353595%BusyGuy@Work.ru>,
BusyGuy <BusyGuy@Work.ru> wrote:

> Hi folks. OSX 10.47 G5 dual. I have a folder with a large number of
> subfolders in it. In each folder is an html file. I need to make an
> identical text change to each file. BBEdit is perfect for the job
> but...I must open each file first. Surely there must be a utility that
> will find-and-replace a text string in each file while it is not open.
> I sure hope so, anyway.
>
> (I even tried to use Dreamweaver. It reported all finds of the old text
> string but did NOT make the change even though the menu commands
> suggested that it would. Dreamweaver sure spent a lot of time working
> through my request for no result!)


I've used BBedit and DW to do these kinds of things, so I don't know
what the problem is. I don't remember if I used them to change an entire
directory or if subdirectories were used, maybe that the problem. Still,
I would try a little harder to see if these apps can do it. FWIW, DW did
everything slowly for me which is why I stopped using it. I also found
that using SSI includes was far and away the best way to deal with
frequently changed elements. You just change one small file and boom,
its all done across the website.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #11 (permalink)  
Old 02-06-2007, 07:19 PM
eponymous cowherd
Newsgroup Contributor
 
Posts: n/a
Re: Looking for a software tool to do a specific job please

In article <210920061928353595%BusyGuy@Work.ru>,
BusyGuy <BusyGuy@Work.ru> wrote:

> Hi folks. OSX 10.47 G5 dual. I have a folder with a large number of
> subfolders in it. In each folder is an html file. I need to make an
> identical text change to each file. BBEdit is perfect for the job
> but...I must open each file first. Surely there must be a utility that
> will find-and-replace a text string in each file while it is not open.
> I sure hope so, anyway.
>
> (I even tried to use Dreamweaver. It reported all finds of the old text
> string but did NOT make the change even though the menu commands
> suggested that it would. Dreamweaver sure spent a lot of time working
> through my request for no result!)


I've used BBedit and DW to do these kinds of things, so I don't know
what the problem is. I don't remember if I used them to change an entire
directory or if subdirectories were used, maybe that the problem. Still,
I would try a little harder to see if these apps can do it. FWIW, DW did
everything slowly for me which is why I stopped using it. I also found
that using SSI includes was far and away the best way to deal with
frequently changed elements. You just change one small file and boom,
its all done across the website.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
PC Tools Software Engineer (SPECIFIC C# / WINDOWS DEVELOPER EXPERIENCE) TPC Tablet PC Jobs 0 04-09-2008 07:10 AM
PC Tools Software Engineer (SPECIFIC C# / WINDOWS DEVELOPER EXPERIENCE) TPC Tablet PC Jobs 0 04-09-2008 06:00 AM
Looking for a software tool to do a specific job please BusyGuy Apple Macintosh Hardware 0 02-06-2007 07:18 PM
need recommendations on what brand, specific computer tool kit to buy (physical tool kits, not software kits/suites) Trevor Smithson Desktop Computers 0 02-06-2007 06:09 PM
MS Windows Software Removal Tool -- How to use!! EW Windows XP 9 01-06-2007 12:30 AM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 10:49 AM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0