[CS-FSLUG] I need a q'n'd shell script or something for batch file editing
Robert W.
robertwo at access-4-free.com
Sun Oct 17 11:36:03 CDT 2004
On 10/16/2004 10:32:08 PM, Timothy R. Butler wrote:
> Hi everyone,
>
> PROBLEM: Internet Explorer chokes on a line of code that works great
> in -- apparently -- every other browser ever on the face of the
> earth.
>
> FIX: Switch the call for a stylesheet from using a relative path to
> an absolute path.
>
> NEW PROBLEM: That change needs to be made in a very large number of
> files on my client's site.
>
> What I need is to find a way to write a quick and dirty batch script
> that will edit the right line in each file.
In this case, Perl is easier than the shell...
#perl -ip -e 's/href="stylesheet.css"/href="\/fullpath\/stylesheet.
css"/' *
The "-i" will replace the original file with the modified version.
--
Robert W.
robertwo at access-4-free.com
It is done. I am the Alpha and the Omega,
the Beginning and the End. -- Revelations 21:6
More information about the Christiansource
mailing list