|
|
 |
Re: FN-FORUM: one for the linux guru's
date posted 16th April 2005 15:21
Sorry, that should have read:
find . -name "*.html" | xargs sed 's/alt="\(.*\)"/alt="\1"
title="\1"/g' --in-place
Graham
> Craig,
>
> > Hey All
> >
> > I was just wondering if anyone new of a tool.. or possible even a linux
> > command that could be used to add "title" properties to a tag wherever
> > there is a "alt" property.. for example:
> >
> >
> > would become:
> Try this:
>
> find . -name "*.html" | xargs sed 's/alt="\(.*\)"/alt="\1"
> title="\1"/g' target1 --in-place
>
> (all on one line). Replace *.html with whatever identifies your files
> and the leading "." with the path of your directory.
>
> Back up first!
>
> Graham
>
> > > an image of an elephant">
> >
> > I have a feeling that some kind of regex could be used for this but
> > regex is still mystery to me..
> >
> > I have a plugin for DW that can do this on a per page basis.. but the
> > site I am working on currently has over 500 pages.. and it's getting
> > bigger.. so was wondering if there was a way to do this recursively
> > through a directory.
> >
> > Thanks for any ideas!
> >
> > Craig
> --
> Graham Stark, Virtual Worlds
> phone: (+044) 01908 618239 mobile: 07952 633185
> Homepage http://www.virtual-worlds.biz/people/graham_s
> Virtual Chancellor http://www.virtual-worlds.biz/vwc
--
Graham Stark, Virtual Worlds
phone: (+044) 01908 618239 mobile: 07952 633185
Homepage http://www.virtual-worlds.biz/people/graham_s
Virtual Chancellor http://www.virtual-worlds.biz/vwc
|
 |
|