The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to pass a variable containing single backtick

Valiantsin Lutchanka
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!
March 7, 2023

Hello, I have to pass as a variable a password containing one single backtick (`) in the middle. By passing it as a variable in my Bamboo plan and making export PASS=${bamboo.password} to utilize it in the job I face an error ''Syntax error: EOF in backquote substitution'' which comes from this backtick. I can not escape it because it is a password, and I don't know how to bypass this problem. Any help is appreciated.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Valiantsin Lutchanka
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!
March 7, 2023

Found the solution thanks to @Daniel Santos 

How to avoid this?

Use a different variable formating.

We have two ways to mention a variable:

  1. ${bamboo.<variableName>}
    Evaluated before the build
  2. $bamboo_<variableName>
    Available  only when the bash script is run
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 7, 2023

Hello @Valiantsin Lutchanka

Welcome to Atlassian Community!

The ${variable} format is an imposition of the shell and Bamboo should follow it to be allowed to use special characters.

This is also documented here:

Thank you,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

TAGS
AUG Leaders

Atlassian Community Events