A
A
Alexander Zinchenko2018-05-04 20:34:02
bash
Alexander Zinchenko, 2018-05-04 20:34:02

How to solve bash error = command not found?

Good evening. Faced such a problem))
line in the script

name ='hello'
или так 
$name  = 'hello'

The result is the same everywhere - line 3: =: command not found
I understand that this snag is funny for someone, but there is nowhere to go, I just can’t do it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
3
3vi1_0n3, 2018-05-11
@Alex1202

It's strange that no one has answered yet)
Probably figured it out already, but I'll answer just in case.
In bash, you cannot use spaces when using = to assign a value, because the space is the parameter separator. Accordingly, this is correct:
And this is wrong:
name ='hello'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question