Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to pass a variable containing single backtick

Valiantsin Lutchanka 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

2 votes
Answer accepted
Valiantsin Lutchanka 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-- 

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events