So in conclusion:
If the line in a file you are grep'ing looks like this
[mysillygrep_2] This is my grep
And the name of this file is the same as the number
$ ls
2
And you issue the following commands
tmp=`grep silly 2`
echo $tmp
it returns the following as the line due to the brackets
2 This is my grep
Instead of the actual line which should be
[mysillygrep_2] This is my grep

The grep command DOES return the expected value, as can be seen
by:
$ echo "$tmp"
[mysillygrep_2] This is my grep
If you do not quote the variable, filename expansion is done, and
[mysillygrep_2] will match the file 2.
$ echo $tmp
2 This is my grep
If you had a file y, that would be printed, as would any other
files matching the pattern:
$ touch y l g
$ echo $tmp
2 g l y This is my grep
--
Chris F.A. Johnson http://cfaj.freeshell.org
=================================================================
Everything in moderation -- including moderation