Chris Dunning Posted May 19, 2004 Posted May 19, 2004 Is there a command in Linux that will do a find->replace in multiple files at once? For example, I want to remove the right column from every page in a site I'm building. In my text editor, I can do a search for the string that creates the cell for the right column and includes it, then replace it with nothing. However, I'd rather not do that for each file individually...is there something I could run from the command line? I'd also like to use it for the Header Tag Controller...in all of those same files, I need to find <table border="0" width="100%" cellspacing="0" cellpadding="0"> and replace it with a longer string that calls the header tag controller files. Surely Linux has a way to do this? Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.
gazzzzzza Posted May 19, 2004 Posted May 19, 2004 i know you can do this using certain programs bbedit (for macintosh) adobe golive (pc/mac) actual search & replace (pc) (demo available on web) (i use this) but i dont use linux so im not sure for linux sorry to do it in these programs (pc ones) select your files/folder and input the starting code and the code you wish to replace it with. always here to offer some useless advice....
Chris Dunning Posted May 19, 2004 Author Posted May 19, 2004 I actually found one for Windows that I'm pretty happy with so far - it's called "Bk replace em." It's freeware - google for it, it's out there. I was hoping to run something from the linux command line, but this is actually more useful - I don't have shell access on every site I run. Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.