Bash: variable substitution

What does this bash script line mean?

cd @SOMEDIR@
renisenbbAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ozoCommented:
Change the current directory to '@SOMEDIR@'
0
renisenbbAuthor Commented:
I meant to ask how is SOMEDIR specified? Is it an env variable?
0
ozoCommented:
@SOMEDIR@ is the name of the directory which is being set to be the current directory.
That the name is somewhat unusual could suggests the possibility that another program may be intended to take the text of the bash script and modify it.
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

renisenbbAuthor Commented:
My question really is :   There are 2 @ signs surrounding some text (in this case, i just used an example of SOMEDIR). What are the 2 @ signs for?

For eg, if i specify a variable like this:
HELLO=Hello
I can then use $ to refer to it like this:
echo $HELLO

So in this case, why is the code not like this ?   :
cd $SOMEDIR
Instead, it is :
cd @SOMEDIR@

What are the 2 @ signs for?
0
ozoCommented:
The 2 @ signs are part of the name of the directory, just like the S and the O and the M and the E and the D and the I and the R are parts of the name of the directory.
(unless some thing else comes around and changes the name in the text of the script)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ozoCommented:
If @SOMEDIR@ is not the name of the directory you want to cd to, then it may be that the 2 @ signs are for drawing your attention to the part of the script where you can fill in the name of the directory you do want to cd to.
0
renisenbbAuthor Commented:
Ok, thanks, i thought it was special bash syntax.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Shell Scripting

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.