0

I want to grep all dates in August or September (date format mm/dd/yyyy with leading zeroes).

I tried:

grep '0\(8\|9\)/[0-9][0-9]/2012'

But command prompt outputs:

The system cannot find the path specified.

Unihedron
  • 10,902
  • 13
  • 62
  • 72
ljustin
  • 347
  • 1
  • 6
  • 16

1 Answers1

2

grep wants a regular expression and a file name. The error message looks like you somehow passed an invalid file name. Assuming the file containing the log entries is named log, try this;

grep '0[89]/[0-9][0-9]/2012' log

(I also tweaked your regex a bit.)

tripleee
  • 175,061
  • 34
  • 275
  • 318
  • That worked perfectly, Thanks! This is what I used, **some command |grep '0[89]/[0-3][0-9]/2012'** – ljustin Sep 10 '12 at 13:37