How to solve the error bash = command not found?

0 like 0 dislike
Good evening. Faced with such a problem ))
the line in the script
name ='hello' or so $name = 'hello'

Summary of all one - line 3: =: command not found
I understand that this problem for someone funny, but nowhere to go, nothing is going to do it
by | 7 views

1 Answer

0 like 0 dislike
It is strange that no one answered )
Probably figured out already, but just in case I will answer.
In bash when you use = to assign a value you cannot put spaces, because the space is a parameter separator. Accordingly, so right:
And so wrong:
name ='hello'

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked May 22, 2019 by niriter
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
33,911 users