Using regular expression in filename
I have a script which gets as input a filename and does a grep on that. Now the problem is something like this:
The files I need to look in for the pattern are named as follows:
out, out.20050421.1234, out.20050421.2134, out.20050420.0012
My program gets as input the filename upto before the last . [DOT], like either, out [for the first file] or out.20050421 for the second and third files.
Now, in the second case [file name input out.20050421], I directly can use grep pattern out.20050421.[0-9]* to get results from the second and third files stated above [desired output]
However, if I get the filename as out, doing a out[0-9]* doesnt work [I dont know why]
Can someone give me a solution to this[assuming that I have not confused people enough]!!!
Last edited by smart_sagittari; 04-22-2005 at 03:31 AM.