• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 174
  • Last Modified:

Linux Shell Scripting: Error with my .sh file

echo $x $y;

Open in new window

couchdbsite.sh: line 2: =Hello: command not found
couchdbsite.sh: line 3: =World: command not found
  • 2
1 Solution
Drop the $ from the start of  lines 2 and 3.

You *set* a variable with
the *use* the variable with
To explain, if you use a variable which has not been set, the shell replaces the variable with the empty string.  it also swallows quotes, so
is processed to

Again, note that ";" is not a command *terminator* - you don't need it (and shouldn't use it) at the end of lines.
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.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now