Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grep help

Status
Not open for further replies.

skiflyer

Programmer
Sep 24, 2002
2,213
US
Ok, not quite the right place, but close!

I'm using a DOS command line, but also using Cygwin, and the question has to do with grep.

I want to get say, all the files from 04/15/2003 - 04/23/2003

So I do a
Code:
dir /OD | grep -e 04/1[5-9]/2003 -e 04/2[0-3]/2003
But I'm conviced I can do this with one pattern... am I dumb or am I right?

-Rob
 
How about
[tt]dir /OD | egrep '04/(1[5-9]|2[0-3])/2003'[/tt]

//Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top