Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

cli syntax for bulk removal of spaces

Computing Services September 10, 2018

Hi, 

Complete newbie here. I am using the confluence command line interface Bob Swift add on and all I really want to do is bulk remove spaces by using the space key. What is the syntax for multiple spaces?

i've tried 

--action removeSpace --space "AD2,AD1,AD3,AD4"

 --action removeSpace --space "AD2","AD1","AD3","AD4"

Can't seem to find a definite answer anywhere. Any help would be much appreciated!

1 answer

1 accepted

1 vote
Answer accepted
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 11, 2018

Hello Team! Using CLI can sometimes be tricky. But according to documentation, you could do something like this:

 

--action runFromContentList --cql "space in spc1,spcx,spc23w" --common '-action removeSpace --space @space@' --continue

Here is a little explanation of the line above:

- runFromContentList
This will run the command for each entry that is found. For example, the CQL given will return the results as being the spaces that match the search

- removeSpace
This will remove the space based on the variable @space@ that is being returned by the runFromContentList

- continue
Will keep executing even if errors are found, like a not found error

You can check further information here:

- CLI Documentation
- How to use replacement variables

I recommend running the above command in a Test Environment before running in a Live one. Make sure that you only remove the desired content!

Let us know if this helps your case!

Computing Services September 13, 2018

Hi Diego, 

AWesome stuff thank you so much ! this has worked :)

Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 13, 2018

Great to know I was able to help you out! Oh, if you vote the answer as accepted, it may help other customers as well.

If you ever need help of want to help other customers, come pay a visit to the Community!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events