|
| | |||||||
| Apple Macintosh Hardware Discuss the Apple Macintosh Hardware |
| | LinkBack | Thread Tools |
| |||
| 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 |
| |||
| 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 |
| |||
| 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 |
| |||
| 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 |
| |||
| 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 |
| |||
| 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. |
| |||
| 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. |
| |||
| 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 |
| |||
| 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 |
| |||
| 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. |
| |||
| 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. |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| 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? |