0

In a groovy script, I have a variable which is a returned value from a Unix process.

def text = ['bash', '-c', command_to_execute].execute().text

I use its text variable to concatenate with some other strings

def concatanated_text = "${var1}.${var2}.${text}.full.zip"

When I print the variable concatanated_text, the result will be in two lines like below.

file.name.2017
.full.zip

But when I manually assign the value to text variable it will look in one line as below.

def text = "2017"
file.name.2017.full.zip

I want to concatenate this string in one line. Please help me with a solution.

0 Answers0