# Difference between

**URL:** <https://community.unix.com/t/difference-between/280469>\
**Category:** UNIX for Dummies Questions & Answers\
**Created:** [January 9, 2011, 10:28am UTC](https://community.unix.com/t/difference-between/280469 "2011-01-09T10:28:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shashank1311](https://community.unix.com/user_avatar/community.unix.com/shashank1311/32/6596_2.png) [@shashank1311](https://community.unix.com/u/shashank1311)\
**Post date:** [January 9, 2011, 10:28am UTC](https://community.unix.com/t/difference-between/280469/1 "2011-01-09T10:28:07Z")

</div>

$x=10

and providing the spaces between = and 10

$x= 10

---

<div class="post-metadata">

**Author:** ![Scott](https://community.unix.com/letter_avatar/scott/32/6_449c533f586939b6e5f246632a46421f.png) [@Scott](https://community.unix.com/u/Scott)\
**Post date:** [January 9, 2011, 10:30am UTC](https://community.unix.com/t/difference-between/280469/2 "2011-01-09T10:30:59Z")

</div>

What shell are you using?

It's likely they are both wrong.

---

<div class="post-metadata">

**Author:** ![shashank1311](https://community.unix.com/user_avatar/community.unix.com/shashank1311/32/6596_2.png) [@shashank1311](https://community.unix.com/u/shashank1311)\
**Post date:** [January 9, 2011, 10:34am UTC](https://community.unix.com/t/difference-between/280469/3 "2011-01-09T10:34:08Z")

</div>

bash shell

---------- Post updated at 10:34 AM ---------- Previous update was at 10:31 AM ----------

actually when i am using  
x=10 and echo "$x" output is 10

but in x= 10 no is not taking it why??

---

<div class="post-metadata">

**Author:** ![Scott](https://community.unix.com/letter_avatar/scott/32/6_449c533f586939b6e5f246632a46421f.png) [@Scott](https://community.unix.com/u/Scott)\
**Post date:** [January 9, 2011, 10:42am UTC](https://community.unix.com/t/difference-between/280469/4 "2011-01-09T10:42:07Z")

</div>

Because it's not the correct syntax.

```nohighlight
BASH(1)                                                                                                        

NAME
       bash - GNU Bourne-Again SHell
...
A variable may be assigned to by a statement of the form

              name=[value]
...

```

There should be no spaces either side of =. `x=" 10"` would be OK, as assignments go.

---

<div class="post-metadata">

**Author:** ![shashank1311](https://community.unix.com/user_avatar/community.unix.com/shashank1311/32/6596_2.png) [@shashank1311](https://community.unix.com/u/shashank1311)\
**Post date:** [January 9, 2011, 10:45am UTC](https://community.unix.com/t/difference-between/280469/5 "2011-01-09T10:45:47Z")

</div>

thanx scottn
