Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Teams
, (opens new window)

CSV Command Line Interface (CLI)
  • Reference
    Reference
     This trigger is hidden
  • User's Guide
    User's Guide
     This trigger is hidden
  • Administrator's Guide
    Administrator's Guide
     This trigger is hidden
  • Release notes
    Release notes
     This trigger is hidden
  • Share data with the Support team
    Share data with the Support team
     This trigger is hidden
  • Downloads
    Downloads
     This trigger is hidden
Results will update as you type.
  • User's Guide
    • Advanced Topics
    • Examples
    • Reference
  • Administrator's Guide
    Calendars
You‘re viewing this with anonymous access, so some content might be blocked.
/
Examples
Updated Aug 19

    



Examples

Action usage examples

Examples give users ideas on actual usage. We use automation to generate, test, and run these actions, so names and combinations may be odd or repetitive. In many cases, other actions or environmental setup is required for the action to run, so you will need to adjust the action parameters and setup appropriate for your environment. 

Command line environments can be different, especially between Windows and non-Windows systems. This page page talks about command line escaping differences and there are differences with respect to environment variable references ($ for non-Windows and %...% for Windows). These differences can impact examples, so recognize and adjust for your platform. In particular, all examples here are run with the standard bash shell on Linux.



convertCsv

--action convertCsv --file "build/output/csvcli/convertCsvCustomizedHtml.txt" --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --propertyFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/html.properties" --columns "column3, column1"

--action convertCsv --file "build/output/csvcli/convertCsvFile.txt" --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv"

--action convertCsv --file "build/output/csvcli/convertCsvVarying.txt" --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/varying.csv"

--action convertCsv --sourceFile "-"

--action convertCsv --sourceFile "-" --columns "1"

--action convertCsv --sourceFile "-" --findReplace "aaa:111" --findReplace "ddd:222"

--action convertCsv --sourceFile "-" --outputType "json"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --augments "<a href=\"https://www.google.com/#q=%1%\">%1%</a>,<a href=\"https://www.google.com/#q=%column2%\">%column2%</a>"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --headingAugments ",augment 2" --columns "2,1"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --headingAugments ",augment 2" --columns "column2,1"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --headingAugments ",augment 2" --columns "column2,1" --outputType "json"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --headingAugments ",augment 2" --columns "column2,1" --outputType "table"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --headingAugments ",augment 2" --columns "column2,1" --outputType "text"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --headingAugments ",augment 2,augment 3"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --outputType "json"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --outputType "table"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --outputType "text"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --outputType "text" --select "column2:(32)|(22)"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/varying.csv" --outputType "json"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/varying.csv" --outputType "table"

--action convertCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/varying.csv" --outputType "text"

--action convertCsv --sourceFile "build/output/csvcli/status2.csv" --columns "1" --headingAugments "%NOT_FOUND%" --verbose

--action convertCsv --sourceFile "build/output/csvcli/status2.csv" --columns "1,2,3,4,5,6,7," --headingAugments ",,Successful,Failed,Skipped,Quarantined,Build" --augments ",,,,,,<a href=\"%url%\">%build%</a>"

--action convertCsv --sourceFile "build/output/csvcli/status2.csv" --headingAugments ",State,Success,Failed" --columns "state,testsfailed,testsSuccessful" --outputType "text"

copyCsv

--action copyCsv --file "build/output/csvcli/copyCsv.txt" --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --columns "3,2,1"

--action copyCsv --file "build/output/csvcli/copyCsvAppend.txt" --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --append

--action copyCsv --file "build/output/csvcli/copyCsvColumns.txt" --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --columns "3,2" --append

--action copyCsv --file "build/output/csvcli/copyCsvDelimiter.txt" --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --columns "3,2,1" --options "delimiter=;"

--action copyCsv --file "build/output/csvcli/copyCsvEmpty.txt" --sourceFile "-"

--action copyCsv --file "build/output/csvcli/status2.csv" --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/status.csv" --columns "completed, state, testssuccessful, tests failed, tests skipped, tests quarantined, build, url"

--action copyCsv --sourceFile "-" --findReplace "aaa:111" --findReplace "ddd:222"

--action copyCsv --sourceFile "-" --findReplaceScope "data-cell" --findReplaceRegex "(?s)\\n:' '" --quiet

--action copyCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --columns "3,2,1" --select "column2:(32)|(22)"

--action copyCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/simple.csv" --headingAugments ",augment 2,augment 3"

--action copyCsv --sourceFile "/opt/atlassian/pipelines/agent/build/src/itest/csv/resources/status.csv" --headingAugments ",State,Success,Failed" --columns "state,tests failed,tests Successful"

getClientInfo

--action getClientInfo

run

--action run -i "examplegear -a getProjectlist -f @temp --limit 5 --columns 1,3,4,5" -i "csv -a convertCsv --sourceFile @temp --headingAugments \"%1%,%2%/%3%\" --augments \"%1%,%2%<br>%3%\" --outputType text --columns 1,2,4 --options tableNoWrap"

--action run -i "examplegear -a getSpaceList --outputType csv --columns key,name,description,id,homepage -f @temp" -i "csv -a convertCsv --sourceFile @temp --headingAugments # --augments %#% --columns 1,2,5 --outputType text --options tableNoWrap"

--action run -i "examplegear -a getSpaceList --outputType csv --columns key,name,description,id,homepage -f @temp" -i "csv -a copyCsv --sourceFile @temp --headingAugments # --augments %#% --columns 1,2,5 -f @temp" -i "csv -a convertCsv --sourceFile @temp --outputType text --options tableNoWrap"

--action run --options "doubleQuoteAlternative=#" -i "examplegear -a getProjectlist -f @temp --limit 3 --columns 1,3,4,5" -i "csv -a copyCsv --sourceFile @temp" -i "csv -a copyCsv --sourceFile @temp --headingAugments #%1%,'%2% %3%'# --augments #%1%,'%2% %3%'# --columns 1,2,4"

--action run --options "doubleQuoteAlternative=#" -i "examplegear -a getProjectlist -f @temp --limit 3 --columns 1,3,4,5" -i "csv -a copyCsv --sourceFile @temp" -i "csv -a copyCsv --sourceFile @temp --headingAugments #%1%,'%2% \\n %3%'# --augments #%1%,'%2% \\n %3%'# --columns 1,2,4"

runFromList

--action runFromList --list "xxx, yyy" --common "--action getClientInfo --data ~@entry@~" --special " ~"

Unable to render {include} The included page could not be found.
Unable to render {include} The included page could not be found.
{"serverDuration": 15, "requestCorrelationId": "c21456c87ccf42a3906e3d0539cf983f"}