Thanks -- figuring that all out would have taken me half a day :)
-MH
On Thu, 2011-02-10 at 14:30 -0600, Matt Glasser wrote:
> Oops good catch :)
>
> Peace,
>
> Matt.
>
> -----Original Message-----
> From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf
> Of Mark Jenkinson
> Sent: Thursday, February 10, 2011 2:26 PM
> To: [log in to unmask]
> Subject: Re: [FSL] broken report links
>
> Hi,
>
> Just to add to this.
> It is quite difficult to do this for paths that contain the "/"
> character with that form of sed. However, you can use
> any delineator, so it is better to go with something like:
> cat $File | sed "s@old_path@new_path@" > $File
> as then old_path and new_path can be things like
> /home/myname/analysis/study2/
> whereas that would fail if you use "/" as the delineator
> for sed.
>
> All the best,
> Mark
>
>
> On 10 Feb 2011, at 20:19, Matt Glasser wrote:
>
> > 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
> >>
> >>
> >
|