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

Alex Eftimiades alexeftimiades at gmail.com
Fri Jul 20 07:49:53 CDT 2012

I have tried the following script:
//Rename Page
set -s OldGroup = TestA
set -s OldPage = A
set -s NewGroup = TestB
set -s NewPage = B
sed -i 's|${OldGroup}([./]\)?)${OldPage}|${NewGroup}$1${NewPage}|gi'  
`pagelist link=${OldGroup}.${OldPage} sep=\n`
mv ${OldGroup}.${OldPage} ${NewGroup}.${NewPage}
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?

Thanks, and I hope this would be a useful modification for others as  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20120720/8a7c8040/attachment-0001.html>

More information about the pmwiki-users mailing list