[pmwiki-users] modifying wikish renaming pages/groups scripts to update links with spaces

Peter Bowers pbowers at pobox.com
Fri Jul 20 09:24:10 CDT 2012


On Fri, Jul 20, 2012 at 2:49 PM, Alex Eftimiades
<alexeftimiades at gmail.com> wrote:
>
> I have tried the following script:
>
> //Rename Page
...
> sed -i 's|${OldGroup}([./]\)?)${OldPage}|${NewGroup}$1${NewPage}|gi' `pagelist link=${OldGroup}.${OldPage} sep=\n`
...
> and I noticed that it only works when the link does not have any spaces. All of my links, by convention, have spaces.
> How might I modify this and the script that renames an entire group and fixes all links to it to include any links with spaces?

Can you give an example to help me understand where the spaces are
messing it up?  Are we talking about [[my page]] as a link to
[[MyPage]]?  If you can give me an example of an existing link with
spaces and what you are hoping will happen then I will see if I can
help...

-Peter



More information about the pmwiki-users mailing list