-2

I have a file with timestamps and I want to grep it so that I can see the lines matching 12:30:00 - 12:32:00 . I know that in bash there is the {0..2} for doing something similar but I dont know in grep how to do it? At the moment I am doing grep 2015-01-12 12:3{0..2} but it doesnt work?

user3124171
  • 401
  • 2
  • 7
  • 19

1 Answers1

2

you can use the following for this.

grep '2015-01-12 12:3[0-2]'

or

grep '2015-01-12 12:3[0,1,2]'

I hope it helps.

Inian
  • 80,270
  • 14
  • 142
  • 161
Spezieh
  • 154
  • 1
  • 2
  • 8