I tried to assign variable a in for-loop: But when I run, it gave error: Why did it give error? How to assign variable a? Answer There can be no spaces on both sides of the equal sign when defining variables in the Shell. It should be:
I tried to assign variable a in for-loop: But when I run, it gave error: Why did it give error? How to assign variable a? Answer There can be no spaces on both sides of the equal sign when defining variables in the Shell. It should be: