Declan McNulty
Declan McNulty

Reputation: 3374

Azure Devops inline bash script subshell output as variable to task group

I have a task in an agent job on Azure DevOps that runs an inline bash script. Part of what it does is to read the content of a file and assign it to a variable:

filecontent=$(<artifact/drop/myfile.txt)

I want to make this task part of a task group, however when I create a task group from the task it is identifying $(<artifact/drop/myfile.txt) as a variable and automatically adding it to the list of variables for the task group.

enter image description here

Is there a way round this?

Upvotes: 0

Views: 1535

Answers (1)

Declan McNulty
Declan McNulty

Reputation: 3374

Set the variable as follows:

filecontent=`cat artifact/drop/myfile.txt`

Upvotes: 2

Related Questions