[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Edlug Archive Mar 2004 ]

RE: [edlug] Global Search and Replace

eep! sed, that's hardcore.

Will give it a read, thanks.


-----Original Message-----
From: Lee Kindness [mailto:lkindness@xxx.xxx.xxx] 
Sent: 16 March 2004 12:13
To: Peter George
Cc: edlug@xxx.xxx.xxx; Lee Kindness
Subject: [edlug] Global Search and Replace

See the sed FAQ at:


In particular the Perl solution 4.4.1.


Peter  George writes:
 > Hello, one of my awful grep/fiind/regexp/vim type questions again I'm afraid.  > 
 > I want to search every .html file in a series of nested directories, for '</body>' and replace it with the following code snippet saving all files automagically.  > 
 > Is there an easy way to do this with a shell, or should I stick to EditPad or BBEdit?  > 
 > <!-- Start of StatCounter Code -->
 > <script type="text/javascript" language="javascript">
 > <!-- 
 > var sc_project=255398; 
 > var sc_invisible=1; 
 > //-->
 > </script>
 > <script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js";></script><noscript><div class="statcounter"><a class="statcounter" href="http://www.statcounter.com";><img class="statcounter" src="http://c1.statcounter.com/counter.php?sc_project=255398&amp;java=0"; alt="site stats" /></a></div></noscript>  > <!-- End of StatCounter Code -->  > </body>  > 
 > TIA
 > P
You can find the EdLUG mailing list FAQ list at:

This archive is kept by wibble@morpheux.org.DONTSPAMME