Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article explains about to use findReplace parameter to replace content in all pages in This article explains the usage of findReplace parameter to replace the content in all the pages in a space using the Confluence Command Line Interface app.

Instructions

...

You can

...

update the content in all the pages of a space by

...

using the runFromPageList

...

 and modifyPage actions.

Run the action command from the terminal/command prompt

...

:
Command:

Code Block
themeMidnight
--action runFromPageList --space "DEMO" --common "-a modifyPage --id "@pageId@" --findReplace "oldtext:newtext""

Output:

Code Block
themeMidnight
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.


Info
  • In the above command

...

  • , DEMO

...

  • is the space key and it

...

  • replaces all the pages in

...

  • the space with

...

  • newtext where the oldtext is found, though the actual page ids are not mentioned explicitly.
  • It is recommended to test this scenario in a non-production environment or run the action with the --simulate parameter, to verify the behavior before deploying it on a production environment.