Forums

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

Store output of very long command in a variable multiline in bitbucket-pipelines.yml

H.hijazi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 28, 2020

I can do this

- var=`<some command>`

but the command is too long and contains pipes that i would like to write on separate lines like

- var=`<command>

  -arg1 value1

  -arg2 value2

 | awk '{print $2}' ...

`

but that doesn't work.

1 answer

0 votes
Max Binnewies
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 1, 2020

What exactly is the problem you are experiencing? Does the bitbucket-pipelines.yaml editor give you an error message or do you get an error actually running the command? Could you post the whole step definition thats causing problems?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events