Here is a working code. Don't forget to put your JIRA credentials inside your ~/.netrc file.
#!/bin/bash URL=http://jira.example.com for SPACE in AA BB CC do curl --netrc -H "X-Atlassian-Token: no-check" --data "syncronous=true&exportType=TYPE_XML&includeComments=true&contentOption=all" -o download-$SPACE.html $URL/spaces/doexportspace.action?key=$SPACE done
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.