Run multiple CLI commands from a single batch or CSV file or text file
This article explains how to run multiple CLI commands from a single batch or CSV file or text file.
Run multiple CLI commands from a single batch file
Prefix each CLI command with 'cmd /c' as shown in the sample below:
cmd /c D:\atlassian-cli-8.7.0\jira.bat --action getServerInfo cmd /c D:\atlassian-cli-8.7.0\jira.bat --action addComment --issue "YUS-1" --comment "my comment"
Run the batch file from CLI.
D:\atlassian-cli-8.7.0>new.bat
Result
Without the 'cmd /c' prefix, only the first command is run in the batch file omitting all the commands that follow.
Run multiple CLI commands from a CSV file
Save the CSV file with the '--action' commands as displayed in the sample below:
--action getServerInfo --action addComment --issue "SUP-22" --comment "my comment" --action updateIssue --issue "SUP-21" --reporter "user10"
Run the CSV file as:
--action run --file "text.csv"
Result
Run multiple CLI commands from a text file
Save the text file with the '--action' commands as displayed in the sample below:
--action getServerInfo --action assignIssue --issue "TEST-8" --userId "user10" --action cloneIssue --issue "TSST-11" --description "clone description"
Run the text file as:
--action run --file "text.txt"
Result
Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2022 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.