grep is not working, please find out the problem

HI Friends,

Traxlist.txt --this is my file contains this txt
-------------
108042708190000.txt
108042708190001.txt
112040108174516.txt
112042708173000.txt
112042708174508.txt
112050108173000.txt
113042708100500.txt
113042708103026.txt

i have varible called file1="112042708*.txt"
i need to search this string type in Traxlist.txt and output should be

112042708173000.txt
----------------------

search=`grep $file1 Traxlist.txt`
echo "search :"$search

i tried this one but its not working
can anyone help me out.

The * in a regular expression is not the same as in file expansion.
The * in "112042708*.txt" means '0 or more times an 8'.
If you want a regular expression that matches '0 or more time a random something' use a dot, as in '.*'

try a "chmod 777" on the source file and then run your grep command. it may just be a permissions issue. I have run into this a number of times.

Quote the variable, try this:

grep "$file1" Traxlist.txt

Regards