This article explains the usage of findReplace parameter to replace the content from all pages in space using the Confluence Command Line Interface app.
Instructions
- We can update the content from all pages of a space by using runFromPageList and modifyPage actions.
Run the action command from the terminal/command prompt:
Command:--action runFromPageList --space "DEMO" --common "-a modifyPage --id "@pageId@" --findReplace "oldtext:newtext""
Output:
Run: -a modifyPage --id 65538 --findReplace oldtext:newtext Page 'page1' in space DEMO modified. Page has id 65538. Run: -a modifyPage --id 32972 --findReplace ldtext:newtext Page 'page2' in space DEMO modified. Page has id 32972. Run: -a modifyPage --id 131106 --findReplace ldtext:newtext Page 'subpage' in space DEMO modified. Page has id 131106. Run: -a modifyPage --id 98306 --findReplace ldtext:newtext Page 'subpage' in space DEMO modified. Page has id 98306.
In the above command "DEMO" is the space key and it replaces all pages in that space with "newtext" where the "oldtext" is found, though the actual page ids are not mentioned explicitly.