Files=`find <path> -name "*.html"`
for File in $Files ; do
cat $File | sed s/"<old path>"/"<new path>"/g | > $File
done
Without < > which mark the things you need to change.
I would back your files up first in case there is a bug in the above code.
Peace,
Matt.
-----Original Message-----
From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf
Of Michael Harms
Sent: Thursday, February 10, 2011 1:54 PM
To: [log in to unmask]
Subject: Re: [FSL] broken report links
I guess I was wondering whether someone has "packaged" sed into a simple
script for this purpose, so that I wouldn't have to figure out the
syntax and all the special character issues... Anyone...?
thanks,
-MH
On Thu, 2011-02-10 at 13:42 -0600, Matt Glasser wrote:
> sed?
>
> -----Original Message-----
> From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf
> Of Michael Harms
> Sent: Thursday, February 10, 2011 1:39 PM
> To: [log in to unmask]
> Subject: [FSL] broken report links
>
> Hello,
> Is there by any chance a wonderful, magical tool/script for
> repairing/fixing broken links in FSL HTML reports if you want to
> move/rename the directory where the referenced data was stored, or in
> the extreme case had to move a whole bunch of directories to a new file
> system? :)
>
> thanks,
> -MH
>
>
|