Groovy to Linux variable
by flukeyLinux from LinuxQuestions.org on (#4Q0HA)
Hello all,
I'm struggling to convert a groovy variable to use in a bash command. Any help would be great. Can anyone see what I am doing wrong?
def teamname = "${loweritam}"
sh '''
appteam="""$teamname-REL"""
team=ap123456
echo $appteam $team
'''
Output:
+ appteam=-REL
+ team=ap123456
+ echo -REL ap123456
-REL ap123456
appteam should look like - 12345tr-REL
I've tried using single quotes like so: appteam='''+teamname+'-REL''''
but that does not work for me either.
thanks,
Fluke


I'm struggling to convert a groovy variable to use in a bash command. Any help would be great. Can anyone see what I am doing wrong?
def teamname = "${loweritam}"
sh '''
appteam="""$teamname-REL"""
team=ap123456
echo $appteam $team
'''
Output:
+ appteam=-REL
+ team=ap123456
+ echo -REL ap123456
-REL ap123456
appteam should look like - 12345tr-REL
I've tried using single quotes like so: appteam='''+teamname+'-REL''''
but that does not work for me either.
thanks,
Fluke