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

Alex Eftimiades alexeftimiades at gmail.com
Fri Jul 20 09:28:06 CDT 2012


Yes. An example might be:
[[Group With Spaces/Page With Spaces]]

This links to the page:
[[GroupWithSpaces/PageWithSpaces]]

I would like to change that to:
[[New Group With Spaces/New Page With Spaces]]

,which would then link to:
[[NewGroupWithSpaces/NewPageWithSpaces]]

Thanks,
Alex

On Jul 20, 2012, at 10:24 AM, Peter Bowers wrote:

> 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