what's wrong with my shell

hey, guys~
I'm kinda new to shell programming on linux. my code is as follows:
1
2
3
4
#!/bin/bash
a = 111
echo $a
read -p "..."

and the execution result is:
a: command not found

It's a simple assignment to variable a. i made reference to some websites, it seams there is no mistake, so what's wrong?
Remove the spaces around =.
 
a=111
Thanks your very much@Peter87.
Another more question. are there some tools can help you to debug shell code? like seting breakpoints, watching values etc?
Include f.e.
1
2
3
4
5
# Code not being debugged
set -vx
# Your code to be debugged
set +vx
# Code not being debugged 


The debug output wil be written to stderr. So you may want to redirect stderr to a text file to not confuse your programs IO.
Topic archived. No new replies allowed.