Find an exact string

Hii,.,

Can some one guide me ...how to find a exact word or string using "grep" not a part of some other string.

say if i need 321 it should not give me 3210 nor 1321 it should only give me line containing string 321

Thanks and Regards,
Joy

use "-w" option with grep command.it will help u to find a perticler string.

ex: grep -w 130 filename

cat file1 | grep " 321 "

Note that there is a space before the 3 and after the 1 in the search string.