The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-07-2008
kittusri9 kittusri9 is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 40
Question 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.